public class FlinkS3FileSystem
extends org.apache.flink.runtime.fs.hdfs.HadoopFileSystem
implements org.apache.flink.core.fs.EntropyInjectingFileSystem
FileSystem interface for S3.
This class implements the common behavior implemented directly by Flink and delegates
common calls to an implementation of Hadoop's filesystem abstraction.| Modifier and Type | Field and Description |
|---|---|
static long |
S3_MULTIPART_MIN_PART_SIZE
The minimum size of a part in the multipart upload, except for the last part: 5 MIBytes.
|
| Constructor and Description |
|---|
FlinkS3FileSystem(org.apache.hadoop.fs.FileSystem hadoopS3FileSystem,
String localTmpDirectory,
String entropyInjectionKey,
int entropyLength,
S3AccessHelper s3UploadHelper,
long s3uploadPartSize,
int maxConcurrentUploadsPerStream)
Creates a FlinkS3FileSystem based on the given Hadoop S3 file system.
|
| Modifier and Type | Method and Description |
|---|---|
org.apache.flink.core.fs.RecoverableWriter |
createRecoverableWriter() |
String |
generateEntropy() |
String |
getEntropyInjectionKey() |
org.apache.flink.core.fs.FileSystemKind |
getKind() |
String |
getLocalTmpDir() |
create, create, delete, exists, getDefaultBlockSize, getFileBlockLocations, getFileStatus, getHadoopFileSystem, getHomeDirectory, getUri, getWorkingDirectory, isDistributedFS, listStatus, mkdirs, open, open, rename, toHadoopPathpublic static final long S3_MULTIPART_MIN_PART_SIZE
public FlinkS3FileSystem(org.apache.hadoop.fs.FileSystem hadoopS3FileSystem,
String localTmpDirectory,
@Nullable
String entropyInjectionKey,
int entropyLength,
@Nullable
S3AccessHelper s3UploadHelper,
long s3uploadPartSize,
int maxConcurrentUploadsPerStream)
This constructor additionally configures the entropy injection for the file system.
hadoopS3FileSystem - The Hadoop FileSystem that will be used under the hood.entropyInjectionKey - The substring that will be replaced by entropy or removed.entropyLength - The number of random alphanumeric characters to inject as entropy.@Nullable public String getEntropyInjectionKey()
getEntropyInjectionKey in interface org.apache.flink.core.fs.EntropyInjectingFileSystempublic String generateEntropy()
generateEntropy in interface org.apache.flink.core.fs.EntropyInjectingFileSystempublic org.apache.flink.core.fs.FileSystemKind getKind()
getKind in class org.apache.flink.runtime.fs.hdfs.HadoopFileSystempublic String getLocalTmpDir()
public org.apache.flink.core.fs.RecoverableWriter createRecoverableWriter()
throws IOException
createRecoverableWriter in class org.apache.flink.runtime.fs.hdfs.HadoopFileSystemIOExceptionCopyright © 2014–2019 The Apache Software Foundation. All rights reserved.