public final class S3FileSystem extends FileSystem
FileSystem implementation which is backed by Amazon's Simple Storage Service (S3). The
implementation uses the REST API of Amazon S3 to facilitate the communication and read/write the data.FileSystem.FSKey, FileSystem.WriteMode| Modifier and Type | Field and Description |
|---|---|
static String |
S3_ACCESS_KEY_KEY
The configuration key to access the S3 access key.
|
static String |
S3_HOST_KEY
The configuration key to access the S3 host.
|
static String |
S3_PORT_KEY
The configuration key to access the S3 port.
|
static String |
S3_RRS_KEY
The configuration key to access the S3 Reduced Redundancy Storage setting.
|
static String |
S3_SCHEME
The scheme which is used by this file system.
|
static String |
S3_SECRET_KEY_KEY
The configuration key to access the S3 secret key.
|
| Constructor and Description |
|---|
S3FileSystem() |
| Modifier and Type | Method and Description |
|---|---|
FSDataOutputStream |
create(Path f,
boolean overwrite) |
FSDataOutputStream |
create(Path f,
boolean overwrite,
int bufferSize,
short replication,
long blockSize) |
boolean |
delete(Path f,
boolean recursive) |
BlockLocation[] |
getFileBlockLocations(FileStatus file,
long start,
long len) |
FileStatus |
getFileStatus(Path f) |
URI |
getUri() |
Path |
getWorkingDirectory() |
void |
initialize(URI name) |
boolean |
isDistributedFS() |
FileStatus[] |
listStatus(Path f) |
boolean |
mkdirs(Path f) |
FSDataInputStream |
open(Path f) |
FSDataInputStream |
open(Path f,
int bufferSize) |
boolean |
rename(Path src,
Path dst) |
exists, get, getDefaultBlockSize, getLocalFileSystem, getNumberOfBlocks, initOutPathDistFS, initOutPathLocalFSpublic static final String S3_HOST_KEY
public static final String S3_PORT_KEY
public static final String S3_RRS_KEY
public static final String S3_ACCESS_KEY_KEY
public static final String S3_SECRET_KEY_KEY
public static final String S3_SCHEME
public Path getWorkingDirectory()
getWorkingDirectory in class FileSystempublic URI getUri()
getUri in class FileSystempublic void initialize(URI name) throws IOException
initialize in class FileSystemIOExceptionpublic FileStatus getFileStatus(Path f) throws IOException
getFileStatus in class FileSystemIOExceptionpublic BlockLocation[] getFileBlockLocations(FileStatus file, long start, long len) throws IOException
getFileBlockLocations in class FileSystemIOExceptionpublic FSDataInputStream open(Path f, int bufferSize) throws IOException
open in class FileSystemIOExceptionpublic FSDataInputStream open(Path f) throws IOException
open in class FileSystemIOExceptionpublic FileStatus[] listStatus(Path f) throws IOException
listStatus in class FileSystemIOExceptionpublic boolean delete(Path f, boolean recursive) throws IOException
delete in class FileSystemIOExceptionpublic boolean mkdirs(Path f) throws IOException
mkdirs in class FileSystemIOExceptionpublic FSDataOutputStream create(Path f, boolean overwrite, int bufferSize, short replication, long blockSize) throws IOException
create in class FileSystemIOExceptionpublic FSDataOutputStream create(Path f, boolean overwrite) throws IOException
create in class FileSystemIOExceptionpublic boolean rename(Path src, Path dst) throws IOException
rename in class FileSystemIOExceptionpublic boolean isDistributedFS()
isDistributedFS in class FileSystemCopyright © 2014 The Apache Software Foundation. All rights reserved.