public class PrestoS3FileSystem extends ExtendedFileSystem
| Modifier and Type | Class and Description |
|---|---|
static class |
PrestoS3FileSystem.PrestoS3ObjectMetadata |
FileSystem.StatisticsDEFAULT_FS, FS_DEFAULT_NAME_KEY, LOG, SHUTDOWN_HOOK_PRIORITY, statistics| Constructor and Description |
|---|
PrestoS3FileSystem() |
| Modifier and Type | Method and Description |
|---|---|
FSDataOutputStream |
append(Path f,
int bufferSize,
org.apache.hadoop.util.Progressable progress) |
void |
close() |
FSDataOutputStream |
create(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(Path path,
boolean recursive) |
static String |
getBucketName(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.
|
FileStatus |
getFileStatus(Path path) |
static PrestoS3FileSystemStats |
getFileSystemStats() |
static com.amazonaws.metrics.RequestMetricCollector |
getMetricsCollector() |
String |
getScheme() |
URI |
getUri() |
Path |
getWorkingDirectory() |
void |
initialize(URI uri,
org.apache.hadoop.conf.Configuration conf) |
static String |
keyFromPath(Path path) |
RemoteIterator<LocatedFileStatus> |
listFiles(Path path,
boolean recursive) |
RemoteIterator<LocatedFileStatus> |
listLocatedStatus(Path path) |
FileStatus[] |
listStatus(Path path) |
boolean |
mkdirs(Path f,
org.apache.hadoop.fs.permission.FsPermission permission) |
FSDataInputStream |
open(Path path,
int bufferSize) |
boolean |
rename(Path src,
Path dst) |
static void |
setMetricsCollector(com.amazonaws.metrics.RequestMetricCollector customMetricCollector) |
void |
setWorkingDirectory(Path path) |
listDirectory, listFiles, openFile, renameFileAsyncaccess, addDelegationTokens, append, append, 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, createNewFile, createNonRecursive, createNonRecursive, createNonRecursive, createSnapshot, createSnapshot, createSymlink, delete, deleteOnExit, deleteSnapshot, enableSymlinks, exists, fixRelativePart, get, get, get, getAclStatus, getAllStatistics, getBlockSize, getCanonicalServiceName, getCanonicalUri, getChildFileSystems, getContentSummary, getDefaultBlockSize, 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, 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, truncatepublic void initialize(URI uri, org.apache.hadoop.conf.Configuration conf) throws IOException
initialize in class FileSystemIOExceptionpublic void close()
throws IOException
close in interface Closeableclose in interface AutoCloseableclose in class FileSystemIOExceptionpublic URI getUri()
getUri in class FileSystempublic String getScheme()
getScheme in class FileSystempublic Path getWorkingDirectory()
getWorkingDirectory in class FileSystempublic void setWorkingDirectory(Path path)
setWorkingDirectory in class FileSystempublic FileStatus[] listStatus(Path path) throws IOException
listStatus in class FileSystemIOExceptionpublic RemoteIterator<LocatedFileStatus> listFiles(Path path, boolean recursive)
listFiles in class FileSystempublic RemoteIterator<LocatedFileStatus> listLocatedStatus(Path path)
listLocatedStatus in class FileSystempublic FileStatus getFileStatus(Path path) throws IOException
getFileStatus in class FileSystemIOExceptionpublic FSDataInputStream open(Path path, int bufferSize)
open in class FileSystempublic FSDataOutputStream create(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 FileSystemIOExceptionpublic FSDataOutputStream append(Path f, int bufferSize, org.apache.hadoop.util.Progressable progress)
append in class FileSystempublic boolean rename(Path src, Path dst) throws IOException
rename in class FileSystemIOExceptionpublic boolean delete(Path path, boolean recursive) throws IOException
delete in class FileSystemIOExceptionpublic boolean mkdirs(Path f, org.apache.hadoop.fs.permission.FsPermission permission)
mkdirs in class FileSystempublic static String getBucketName(URI uri)
uri - The URI from which to extract a host value.IllegalArgumentException - If the bucket can not be determined from the URI.public static PrestoS3FileSystemStats getFileSystemStats()
public static com.amazonaws.metrics.RequestMetricCollector getMetricsCollector()
public static void setMetricsCollector(com.amazonaws.metrics.RequestMetricCollector customMetricCollector)
Copyright © 2012–2023. All rights reserved.