@InterfaceAudience.Public @InterfaceStability.Stable public class NativeS3FileSystem extends FileSystem
FileSystem for reading and writing files stored on
Amazon S3.
Unlike S3FileSystem this implementation
stores files on S3 in their
native form so they can be read by other S3 tools.
A note about directories. S3 of course has no "native" support for them. The idiom we choose then is: for any directory created by this class, we use an empty object "#{dirpath}_$folder$" as a marker. Further, to interoperate with other S3 tools, we also accept the following:
S3FileSystemFileSystem.Statistics| Modifier and Type | Field and Description |
|---|---|
static org.slf4j.Logger |
LOG |
DEFAULT_FS, FS_DEFAULT_NAME_KEY, SHUTDOWN_HOOK_PRIORITY, statistics| Constructor and Description |
|---|
NativeS3FileSystem() |
NativeS3FileSystem(org.apache.hadoop.fs.s3native.NativeFileSystemStore store) |
| Modifier and Type | Method and Description |
|---|---|
FSDataOutputStream |
append(Path f,
int bufferSize,
Progressable progress)
This optional operation is not yet supported.
|
FSDataOutputStream |
create(Path f,
FsPermission permission,
boolean overwrite,
int bufferSize,
short replication,
long blockSize,
Progressable progress) |
boolean |
delete(Path f,
boolean recurse) |
String |
getCanonicalServiceName() |
long |
getDefaultBlockSize() |
FileStatus |
getFileStatus(Path f) |
String |
getScheme()
Return the protocol scheme for the FileSystem.
|
URI |
getUri() |
Path |
getWorkingDirectory() |
void |
initialize(URI uri,
Configuration conf) |
FileStatus[] |
listStatus(Path f)
If
f is a file, this method will make a single call to S3. |
boolean |
mkdirs(Path f,
FsPermission permission) |
FSDataInputStream |
open(Path f,
int bufferSize) |
boolean |
rename(Path src,
Path dst) |
void |
setWorkingDirectory(Path newDir)
Set the working directory to the given directory.
|
access, addDelegationTokens, append, append, 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, createNewFile, createNonRecursive, createNonRecursive, createNonRecursive, createSnapshot, createSnapshot, createSymlink, delete, deleteOnExit, deleteSnapshot, enableSymlinks, exists, fixRelativePart, get, get, get, getAclStatus, getAllStatistics, getBlockSize, getCanonicalUri, getChildFileSystems, getContentSummary, getDefaultBlockSize, getDefaultPort, getDefaultReplication, getDefaultReplication, getDefaultUri, getDelegationToken, getFileBlockLocations, getFileBlockLocations, getFileChecksum, getFileChecksum, getFileLinkStatus, getFileSystemClass, getFSofPath, getHomeDirectory, getInitialWorkingDirectory, getLength, getLinkTarget, getLocal, getName, getNamed, getReplication, getServerDefaults, getServerDefaults, getStatistics, getStatistics, getStatus, getStatus, getUsed, getXAttr, getXAttrs, getXAttrs, globStatus, globStatus, isDirectory, isFile, listCorruptFileBlocks, listFiles, listLocatedStatus, listLocatedStatus, listStatus, listStatus, listStatus, listStatusIterator, listXAttrs, makeQualified, mkdirs, mkdirs, modifyAclEntries, moveFromLocalFile, moveFromLocalFile, moveToLocalFile, newInstance, newInstance, newInstance, newInstanceLocal, open, primitiveCreate, primitiveMkdir, primitiveMkdir, printStatistics, processDeleteOnExit, removeAcl, removeAclEntries, removeDefaultAcl, removeXAttr, rename, renameSnapshot, resolveLink, resolvePath, setAcl, setDefaultUri, setDefaultUri, setOwner, setPermission, setReplication, setTimes, setVerifyChecksum, setWriteChecksum, setXAttr, setXAttr, startLocalOutput, supportsSymlinks, truncategetConf, setConfpublic NativeS3FileSystem()
public NativeS3FileSystem(org.apache.hadoop.fs.s3native.NativeFileSystemStore store)
public String getScheme()
getScheme in class FileSystems3npublic void initialize(URI uri, Configuration conf) throws IOException
initialize in class FileSystemIOExceptionpublic FSDataOutputStream append(Path f, int bufferSize, Progressable progress) throws IOException
append in class FileSystemIOExceptionpublic FSDataOutputStream create(Path f, FsPermission permission, boolean overwrite, int bufferSize, short replication, long blockSize, Progressable progress) throws IOException
create in class FileSystemIOExceptionpublic boolean delete(Path f, boolean recurse) throws IOException
delete in class FileSystemIOExceptionpublic FileStatus getFileStatus(Path f) throws IOException
getFileStatus in class FileSystemIOExceptionpublic URI getUri()
getUri in class FileSystempublic FileStatus[] listStatus(Path f) throws IOException
If f is a file, this method will make a single call to S3.
If f is a directory, this method will make a maximum of
(n / 1000) + 2 calls to S3, where n is the total number of
files and directories contained directly in f.
listStatus in class FileSystemIOExceptionpublic boolean mkdirs(Path f, FsPermission permission) throws IOException
mkdirs in class FileSystemIOExceptionpublic FSDataInputStream open(Path f, int bufferSize) throws IOException
open in class FileSystemIOExceptionpublic boolean rename(Path src, Path dst) throws IOException
rename in class FileSystemIOExceptionpublic long getDefaultBlockSize()
getDefaultBlockSize in class FileSystempublic void setWorkingDirectory(Path newDir)
setWorkingDirectory in class FileSystempublic Path getWorkingDirectory()
getWorkingDirectory in class FileSystempublic String getCanonicalServiceName()
getCanonicalServiceName in class FileSystemCopyright © 2018 CERN. All Rights Reserved.