@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 |
LOG
Deprecated.
|
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, 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, 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, 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, unsetStoragePolicy
getConf, setConf
public String getScheme()
getScheme
in class FileSystem
s3n
public void initialize(URI uri, Configuration conf) throws IOException
initialize
in class FileSystem
uri
- a URI whose authority section names the host, port, etc.
for this FileSystemconf
- the configurationIOException
- always.public FileStatus getFileStatus(Path f) throws IOException
FileSystem
getFileStatus
in class FileSystem
f
- The path we want information fromFileNotFoundException
- when the path does not existIOException
- see specific implementationpublic URI getUri()
FileSystem
getUri
in class FileSystem
public FSDataInputStream open(Path f, int bufferSize) throws IOException
FileSystem
open
in class FileSystem
f
- 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
FileSystem
create
in class FileSystem
f
- 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
FileSystem
append
in class FileSystem
f
- 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
FileSystem
rename
in class FileSystem
src
- path to be renameddst
- new path after renameIOException
- on failurepublic boolean delete(Path f, boolean recursive) throws IOException
FileSystem
delete
in class FileSystem
f
- 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
FileSystem
Does 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 FileSystem
f
- given pathFileNotFoundException
- when the path does not existIOException
- see specific implementationpublic void setWorkingDirectory(Path new_dir)
FileSystem
setWorkingDirectory
in class FileSystem
new_dir
- Path of new working directorypublic Path getWorkingDirectory()
FileSystem
getWorkingDirectory
in class FileSystem
public boolean mkdirs(Path f, FsPermission permission) throws IOException
FileSystem
mkdirs
in class FileSystem
f
- path to createpermission
- to apply to fIOException
- IO failureCopyright © 2023 Apache Software Foundation. All rights reserved.