public class S3PrestoFileSystem extends HadoopFileSystem implements 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.FileSystem.WriteMode
Constructor and Description |
---|
S3PrestoFileSystem(com.facebook.presto.hive.PrestoS3FileSystem prestoFs)
Creates a S3PrestoFileSystem based on the given Presto S3 file system.
|
S3PrestoFileSystem(com.facebook.presto.hive.PrestoS3FileSystem prestoFs,
String entropyInjectionKey,
int entropyLength)
Creates a FlinkS3FileSystem based on the given Hadoop S3 file system.
|
Modifier and Type | Method and Description |
---|---|
String |
generateEntropy()
Creates a string with random entropy to be injected into a path.
|
String |
getEntropyInjectionKey()
Gets the marker string that represents the substring of a path to be replaced
by the entropy characters.
|
FileSystemKind |
getKind()
Gets a description of the characteristics of this file system.
|
create, create, createRecoverableWriter, delete, exists, getDefaultBlockSize, getFileBlockLocations, getFileStatus, getHadoopFileSystem, getHomeDirectory, getUri, getWorkingDirectory, isDistributedFS, listStatus, mkdirs, open, open, rename
create, get, getDefaultFsUri, getLocalFileSystem, getUnguardedFileSystem, initialize, initOutPathDistFS, initOutPathLocalFS
public S3PrestoFileSystem(com.facebook.presto.hive.PrestoS3FileSystem prestoFs)
public S3PrestoFileSystem(com.facebook.presto.hive.PrestoS3FileSystem prestoFs, @Nullable String entropyInjectionKey, int entropyLength)
This constructor additionally configures the entropy injection for the file system.
prestoFs
- The Presto S3 File System 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()
EntropyInjectingFileSystem
getEntropyInjectionKey
in interface EntropyInjectingFileSystem
public String generateEntropy()
EntropyInjectingFileSystem
generateEntropy
in interface EntropyInjectingFileSystem
public FileSystemKind getKind()
FileSystem
getKind
in class HadoopFileSystem
Copyright © 2014–2020 The Apache Software Foundation. All rights reserved.