@InterfaceAudience.Public @InterfaceStability.Stable public final class NativeS3FileSystem extends FileSystem
fs.s3n.impl=org.apache.hadoop.fs.s3native.NativeS3FileSystem
 and then tries to create a filesystem off an s3n:// URL.
 The initialize(URI, Configuration) method will throw
 an IOException informing the user of their need to migrate.| Modifier and Type | Field and Description | 
|---|---|
| static org.slf4j.Logger | LOGDeprecated.  | 
DEFAULT_FS, FS_DEFAULT_NAME_KEY, SHUTDOWN_HOOK_PRIORITY, statistics, TRASH_PREFIX, USER_HOME_PREFIX| Constructor and Description | 
|---|
| NativeS3FileSystem()Deprecated.  | 
| Modifier and Type | Method and Description | 
|---|---|
| FSDataOutputStream | append(Path f,
      int bufferSize,
      Progressable progress)Deprecated.  Append to an existing file (optional operation). | 
| FSDataOutputStream | create(Path f,
      FsPermission permission,
      boolean overwrite,
      int bufferSize,
      short replication,
      long blockSize,
      Progressable progress)Deprecated.  Create an FSDataOutputStream at the indicated Path with write-progress
 reporting. | 
| boolean | delete(Path f,
      boolean recursive)Deprecated.  Delete a file. | 
| FileStatus | getFileStatus(Path f)Deprecated.  Return a file status object that represents the path. | 
| String | getScheme()Deprecated.  Return the protocol scheme for the FileSystem. | 
| URI | getUri()Deprecated.  Returns a URI which identifies this FileSystem. | 
| Path | getWorkingDirectory()Deprecated.  Get the current working directory for the given FileSystem | 
| void | initialize(URI uri,
          Configuration conf)Deprecated.  Always fail to initialize. | 
| FileStatus[] | listStatus(Path f)Deprecated.  List the statuses of the files/directories in the given path if the path is
 a directory. | 
| boolean | mkdirs(Path f,
      FsPermission permission)Deprecated.  Make the given file and all non-existent parents into
 directories. | 
| FSDataInputStream | open(Path f,
    int bufferSize)Deprecated.  Opens an FSDataInputStream at the indicated Path. | 
| boolean | rename(Path src,
      Path dst)Deprecated.  Renames Path src to Path dst. | 
| void | setWorkingDirectory(Path new_dir)Deprecated.  Set the current working directory for the given FileSystem. | 
append, append, append, append, appendFile, areSymlinksEnabled, cancelDeleteOnExit, canonicalizeUri, checkPath, clearStatistics, close, closeAll, closeAllForUGI, completeLocalOutput, concat, copyFromLocalFile, copyFromLocalFile, copyFromLocalFile, copyFromLocalFile, copyToLocalFile, copyToLocalFile, copyToLocalFile, create, create, create, create, create, create, create, create, create, create, create, create, createBulkDelete, createDataOutputStreamBuilder, createFile, createMultipartUploader, createNewFile, createNonRecursive, createNonRecursive, createNonRecursive, createPathHandle, createSnapshot, createSnapshot, createSymlink, delete, deleteOnExit, deleteSnapshot, enableSymlinks, exists, fixRelativePart, get, get, get, getAclStatus, getAllStatistics, getAllStoragePolicies, getBlockSize, getCanonicalServiceName, getCanonicalUri, getContentSummary, getDefaultBlockSize, getDefaultBlockSize, getDefaultPort, getDefaultReplication, getDefaultReplication, getDefaultUri, getEnclosingRoot, getFileBlockLocations, getFileBlockLocations, getFileChecksum, getFileChecksum, getFileLinkStatus, getFileSystemClass, getFSofPath, getGlobalStorageStatistics, getHomeDirectory, getInitialWorkingDirectory, getLength, getLinkTarget, getLocal, getName, getNamed, getPathHandle, getQuotaUsage, getReplication, getServerDefaults, getServerDefaults, getStatistics, getStatistics, getStatus, getStatus, getStoragePolicy, getStorageStatistics, getTrashRoot, getTrashRoots, getUsed, getUsed, getXAttr, getXAttrs, getXAttrs, globStatus, globStatus, hasPathCapability, isDirectory, isFile, listCorruptFileBlocks, listFiles, listLocatedStatus, listLocatedStatus, listStatus, listStatus, listStatus, listStatusIterator, listXAttrs, makeQualified, mkdirs, mkdirs, modifyAclEntries, moveFromLocalFile, moveFromLocalFile, moveToLocalFile, msync, newInstance, newInstance, newInstance, newInstanceLocal, open, open, open, openFile, openFile, openFileWithOptions, openFileWithOptions, primitiveCreate, primitiveMkdir, primitiveMkdir, printStatistics, processDeleteOnExit, removeAcl, removeAclEntries, removeDefaultAcl, removeXAttr, rename, renameSnapshot, resolveLink, resolvePath, satisfyStoragePolicy, setAcl, setDefaultUri, setDefaultUri, setOwner, setPermission, setQuota, setQuotaByStorageType, setReplication, setStoragePolicy, setTimes, setVerifyChecksum, setWriteChecksum, setXAttr, setXAttr, startLocalOutput, supportsSymlinks, truncate, unsetStoragePolicygetConf, setConfpublic String getScheme()
getScheme in class FileSystems3npublic void initialize(URI uri, Configuration conf) throws IOException
initialize in class FileSystemuri - a URI whose authority section names the host, port, etc.
   for this FileSystemconf - the configurationIOException - always.public FileStatus getFileStatus(Path f) throws IOException
FileSystemgetFileStatus in class FileSystemf - The path we want information fromFileNotFoundException - when the path does not existIOException - see specific implementationpublic URI getUri()
FileSystemgetUri in class FileSystempublic FSDataInputStream open(Path f, int bufferSize) throws IOException
FileSystemopen in class FileSystemf - the file name to openbufferSize - the size of the buffer to be used.IOException - IO failurepublic FSDataOutputStream create(Path f, FsPermission permission, boolean overwrite, int bufferSize, short replication, long blockSize, Progressable progress) throws IOException
FileSystemcreate in class FileSystemf - the file name to openpermission - file permissionoverwrite - if a file with this name already exists, then if true,
   the file will be overwritten, and if false an error will be thrown.bufferSize - the size of the buffer to be used.replication - required block replication for the file.blockSize - block sizeprogress - the progress reporterIOException - IO failureFileSystem.setPermission(Path, FsPermission)public FSDataOutputStream append(Path f, int bufferSize, Progressable progress) throws IOException
FileSystemappend in class FileSystemf - the existing file to be appended.bufferSize - the size of the buffer to be used.progress - for reporting progress if it is not null.IOException - IO failurepublic boolean rename(Path src, Path dst) throws IOException
FileSystemrename in class FileSystemsrc - path to be renameddst - new path after renameIOException - on failurepublic boolean delete(Path f, boolean recursive) throws IOException
FileSystemdelete in class FileSystemf - the path to delete.recursive - if path is a directory and set to
 true, the directory is deleted else throws an exception. In
 case of a file the recursive can be set to either true or false.IOException - IO failurepublic FileStatus[] listStatus(Path f) throws IOException
FileSystemDoes not guarantee to return the List of files/directories status in a sorted order.
Will not return null. Expect IOException upon access error.
listStatus in class FileSystemf - given pathFileNotFoundException - when the path does not existIOException - see specific implementationpublic void setWorkingDirectory(Path new_dir)
FileSystemsetWorkingDirectory in class FileSystemnew_dir - Path of new working directorypublic Path getWorkingDirectory()
FileSystemgetWorkingDirectory in class FileSystempublic boolean mkdirs(Path f, FsPermission permission) throws IOException
FileSystemmkdirs in class FileSystemf - path to createpermission - to apply to fIOException - IO failureCopyright © 2025 Apache Software Foundation. All rights reserved.