public class PrestoS3FileSystem
extends org.apache.hadoop.fs.FileSystem
| Constructor and Description |
|---|
PrestoS3FileSystem() |
| Modifier and Type | Method and Description |
|---|---|
org.apache.hadoop.fs.FSDataOutputStream |
append(org.apache.hadoop.fs.Path f,
int bufferSize,
org.apache.hadoop.util.Progressable progress) |
void |
close() |
org.apache.hadoop.fs.FSDataOutputStream |
create(org.apache.hadoop.fs.Path path,
org.apache.hadoop.fs.permission.FsPermission permission,
boolean overwrite,
int bufferSize,
short replication,
long blockSize,
org.apache.hadoop.util.Progressable progress) |
boolean |
delete(org.apache.hadoop.fs.Path path,
boolean recursive) |
static String |
extractBucketName(URI uri)
Helper function used to work around the fact that if you use an S3 bucket with an '_' that java.net.URI
behaves differently and sets the host value to null whereas S3 buckets without '_' have a properly
set host field.
|
protected String |
getBucketName(URI uri) |
org.apache.hadoop.fs.FileStatus |
getFileStatus(org.apache.hadoop.fs.Path path) |
static PrestoS3FileSystemStats |
getFileSystemStats() |
URI |
getUri() |
org.apache.hadoop.fs.Path |
getWorkingDirectory() |
void |
initialize(URI uri,
org.apache.hadoop.conf.Configuration conf) |
static String |
keyFromPath(org.apache.hadoop.fs.Path path) |
org.apache.hadoop.fs.RemoteIterator<org.apache.hadoop.fs.LocatedFileStatus> |
listLocatedStatus(org.apache.hadoop.fs.Path path) |
org.apache.hadoop.fs.FileStatus[] |
listStatus(org.apache.hadoop.fs.Path path) |
boolean |
mkdirs(org.apache.hadoop.fs.Path f,
org.apache.hadoop.fs.permission.FsPermission permission) |
org.apache.hadoop.fs.FSDataInputStream |
open(org.apache.hadoop.fs.Path path,
int bufferSize) |
boolean |
rename(org.apache.hadoop.fs.Path src,
org.apache.hadoop.fs.Path dst) |
void |
setWorkingDirectory(org.apache.hadoop.fs.Path path) |
access, append, append, appendFile, areSymlinksEnabled, cancelDeleteOnExit, canonicalizeUri, checkPath, clearStatistics, closeAll, closeAllForUGI, completeLocalOutput, concat, copyFromLocalFile, copyFromLocalFile, copyFromLocalFile, copyFromLocalFile, copyToLocalFile, copyToLocalFile, copyToLocalFile, create, create, create, create, create, create, create, create, create, create, create, create, createFile, createNewFile, createNonRecursive, createNonRecursive, createNonRecursive, createPathHandle, createSnapshot, createSnapshot, createSymlink, delete, deleteOnExit, deleteSnapshot, enableSymlinks, exists, fixRelativePart, get, get, get, getAclStatus, getAdditionalTokenIssuers, getAllStatistics, getAllStoragePolicies, getBlockSize, getCanonicalServiceName, getCanonicalUri, getChildFileSystems, getContentSummary, getDefaultBlockSize, getDefaultBlockSize, getDefaultPort, getDefaultReplication, getDefaultReplication, getDefaultUri, getDelegationToken, getFileBlockLocations, getFileBlockLocations, getFileChecksum, getFileChecksum, getFileLinkStatus, getFileSystemClass, getFSofPath, getGlobalStorageStatistics, getHomeDirectory, getInitialWorkingDirectory, getLength, getLinkTarget, getLocal, getName, getNamed, getPathHandle, getQuotaUsage, getReplication, getScheme, getServerDefaults, getServerDefaults, getStatistics, getStatistics, getStatus, getStatus, getStoragePolicy, getStorageStatistics, getTrashRoot, getTrashRoots, getUsed, getUsed, getXAttr, getXAttrs, getXAttrs, globStatus, globStatus, isDirectory, isFile, listCorruptFileBlocks, listFiles, listLocatedStatus, listStatus, listStatus, listStatus, listStatusBatch, listStatusIterator, listXAttrs, makeQualified, mkdirs, mkdirs, modifyAclEntries, moveFromLocalFile, moveFromLocalFile, moveToLocalFile, newInstance, newInstance, newInstance, newInstanceLocal, open, open, open, primitiveCreate, primitiveMkdir, primitiveMkdir, printStatistics, processDeleteOnExit, removeAcl, removeAclEntries, removeDefaultAcl, removeXAttr, rename, renameSnapshot, resolveLink, resolvePath, setAcl, setDefaultUri, setDefaultUri, setOwner, setPermission, setReplication, setStoragePolicy, setTimes, setVerifyChecksum, setWriteChecksum, setXAttr, setXAttr, startLocalOutput, supportsSymlinks, truncate, unsetStoragePolicypublic static final String S3_USER_AGENT_SUFFIX
public static final String S3_USER_AGENT_PREFIX
public static final String S3_CREDENTIALS_PROVIDER
public static final String S3_SSE_TYPE
public static final String S3_SSE_ENABLED
public static final String S3_SSE_KMS_KEY_ID
public static final String S3_KMS_KEY_ID
public static final String S3_ENCRYPTION_MATERIALS_PROVIDER
public static final String S3_PIN_CLIENT_TO_CURRENT_REGION
public static final String S3_MULTIPART_MIN_PART_SIZE
public static final String S3_MULTIPART_MIN_FILE_SIZE
public static final String S3_STAGING_DIRECTORY
public static final String S3_MAX_CONNECTIONS
public static final String S3_SOCKET_TIMEOUT
public static final String S3_CONNECT_TIMEOUT
public static final String S3_MAX_RETRY_TIME
public static final String S3_MAX_BACKOFF_TIME
public static final String S3_MAX_CLIENT_RETRIES
public static final String S3_MAX_ERROR_RETRIES
public static final String S3_SSL_ENABLED
public static final String S3_PATH_STYLE_ACCESS
public static final String S3_SIGNER_TYPE
public static final String S3_SIGNER_CLASS
public static final String S3_ENDPOINT
public static final String S3_SECRET_KEY
public static final String S3_ACCESS_KEY
public static final String S3_SESSION_TOKEN
public static final String S3_IAM_ROLE
public static final String S3_EXTERNAL_ID
public static final String S3_ACL_TYPE
public static final String S3_SKIP_GLACIER_OBJECTS
public static final String S3_REQUESTER_PAYS_ENABLED
public static final String S3_STORAGE_CLASS
public void initialize(URI uri, org.apache.hadoop.conf.Configuration conf) throws IOException
initialize in class org.apache.hadoop.fs.FileSystemIOExceptionpublic void close()
throws IOException
close in interface Closeableclose in interface AutoCloseableclose in class org.apache.hadoop.fs.FileSystemIOExceptionpublic URI getUri()
getUri in class org.apache.hadoop.fs.FileSystempublic org.apache.hadoop.fs.Path getWorkingDirectory()
getWorkingDirectory in class org.apache.hadoop.fs.FileSystempublic void setWorkingDirectory(org.apache.hadoop.fs.Path path)
setWorkingDirectory in class org.apache.hadoop.fs.FileSystempublic org.apache.hadoop.fs.FileStatus[] listStatus(org.apache.hadoop.fs.Path path)
throws IOException
listStatus in class org.apache.hadoop.fs.FileSystemIOExceptionpublic org.apache.hadoop.fs.RemoteIterator<org.apache.hadoop.fs.LocatedFileStatus> listLocatedStatus(org.apache.hadoop.fs.Path path)
listLocatedStatus in class org.apache.hadoop.fs.FileSystempublic org.apache.hadoop.fs.FileStatus getFileStatus(org.apache.hadoop.fs.Path path)
throws IOException
getFileStatus in class org.apache.hadoop.fs.FileSystemIOExceptionpublic org.apache.hadoop.fs.FSDataInputStream open(org.apache.hadoop.fs.Path path,
int bufferSize)
open in class org.apache.hadoop.fs.FileSystempublic org.apache.hadoop.fs.FSDataOutputStream create(org.apache.hadoop.fs.Path path,
org.apache.hadoop.fs.permission.FsPermission permission,
boolean overwrite,
int bufferSize,
short replication,
long blockSize,
org.apache.hadoop.util.Progressable progress)
throws IOException
create in class org.apache.hadoop.fs.FileSystemIOExceptionpublic org.apache.hadoop.fs.FSDataOutputStream append(org.apache.hadoop.fs.Path f,
int bufferSize,
org.apache.hadoop.util.Progressable progress)
append in class org.apache.hadoop.fs.FileSystempublic boolean rename(org.apache.hadoop.fs.Path src,
org.apache.hadoop.fs.Path dst)
throws IOException
rename in class org.apache.hadoop.fs.FileSystemIOExceptionpublic boolean delete(org.apache.hadoop.fs.Path path,
boolean recursive)
throws IOException
delete in class org.apache.hadoop.fs.FileSystemIOExceptionpublic boolean mkdirs(org.apache.hadoop.fs.Path f,
org.apache.hadoop.fs.permission.FsPermission permission)
mkdirs in class org.apache.hadoop.fs.FileSystempublic static String keyFromPath(org.apache.hadoop.fs.Path path)
public static String extractBucketName(URI uri)
uri - The URI from which to extract a host value.IllegalArgumentException - If the bucket cannot be determined from the URI.public static PrestoS3FileSystemStats getFileSystemStats()
Copyright © 2012–2020. All rights reserved.