@NotThreadSafe public final class FileSystem extends AbstractFileSystem
FileSystem
interface. Any program working with Hadoop HDFS can work with Alluxio transparently. Note that
the performance of using this API may not be as efficient as the performance of using the Alluxio
native API defined in FileSystem
, which this API is built on top of.FIRST_COM_PATH, mAlluxioConf, mFileSystem
Constructor and Description |
---|
FileSystem()
Constructs a new
FileSystem . |
FileSystem(FileSystem fileSystem)
Constructs a new
FileSystem instance with a
specified FileSystem handler for tests. |
Modifier and Type | Method and Description |
---|---|
protected AlluxioURI |
getAlluxioPath(org.apache.hadoop.fs.Path path)
Used to convert hadoop path to Alluxio path.
|
protected Map<String,Object> |
getConfigurationFromUri(URI uri,
org.apache.hadoop.conf.Configuration conf)
Gets the connection configuration from the input uri.
|
protected org.apache.hadoop.fs.Path |
getFsPath(String fsUriHeader,
URIStatus fileStatus)
Used to get FS native path from Alluxio file status.
|
protected String |
getFsScheme(URI fsUri)
Used to get FS scheme.
|
String |
getScheme()
Gets the URI scheme that maps to the
FileSystem . |
protected boolean |
isZookeeperMode() |
protected void |
validateFsUri(URI fsUri)
Validates given FS base URI for scheme and authority.
|
access, append, close, create, createNonRecursive, delete, delete, getCanonicalServiceName, getDefaultBlockSize, getDefaultReplication, getFileBlockLocations, getFileStatus, getUri, getWorkingDirectory, initialize, initialize, listStatus, mkdirs, open, rename, setOwner, setPermission, setReplication, setWorkingDirectory
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, createDataInputStreamBuilder, createDataInputStreamBuilder, createDataOutputStreamBuilder, createFile, createNewFile, createNonRecursive, createNonRecursive, createPathHandle, createSnapshot, createSnapshot, createSymlink, deleteOnExit, deleteSnapshot, enableSymlinks, exists, fixRelativePart, get, get, get, getAclStatus, getAdditionalTokenIssuers, getAllStatistics, getAllStoragePolicies, getBlockSize, getCanonicalUri, getChildFileSystems, getContentSummary, getDefaultBlockSize, getDefaultPort, getDefaultReplication, getDefaultUri, getDelegationToken, getFileBlockLocations, getFileChecksum, getFileChecksum, getFileLinkStatus, getFileSystemClass, getFSofPath, getGlobalStorageStatistics, getHomeDirectory, getInitialWorkingDirectory, getLength, getLinkTarget, getLocal, getName, getNamed, getPathHandle, getQuotaUsage, getReplication, getServerDefaults, getServerDefaults, getStatistics, getStatistics, getStatus, getStatus, getStoragePolicy, getStorageStatistics, getTrashRoot, getTrashRoots, getUsed, getUsed, getXAttr, getXAttrs, getXAttrs, globStatus, globStatus, hasPathCapability, isDirectory, isFile, listCorruptFileBlocks, listFiles, listLocatedStatus, listLocatedStatus, listStatus, listStatus, listStatus, listStatusBatch, listStatusIterator, listXAttrs, makeQualified, mkdirs, mkdirs, modifyAclEntries, moveFromLocalFile, moveFromLocalFile, moveToLocalFile, newInstance, newInstance, newInstance, newInstanceLocal, open, open, open, openFile, openFile, openFileWithOptions, openFileWithOptions, primitiveCreate, primitiveMkdir, primitiveMkdir, printStatistics, processDeleteOnExit, removeAcl, removeAclEntries, removeDefaultAcl, removeXAttr, rename, renameSnapshot, resolveLink, resolvePath, satisfyStoragePolicy, setAcl, setDefaultUri, setDefaultUri, setQuota, setQuotaByStorageType, setStoragePolicy, setTimes, setVerifyChecksum, setWriteChecksum, setXAttr, setXAttr, startLocalOutput, supportsSymlinks, truncate, unsetStoragePolicy
public FileSystem()
FileSystem
.public FileSystem(FileSystem fileSystem)
FileSystem
instance with a
specified FileSystem
handler for tests.fileSystem
- handler to file systempublic String getScheme()
AbstractFileSystem
FileSystem
. This was
introduced in Hadoop 2.x as a means to make loading new FileSystem
s simpler.getScheme
in class AbstractFileSystem
FileSystem.createFileSystem(java.net.URI,
org.apache.hadoop.conf.Configuration)
protected boolean isZookeeperMode()
isZookeeperMode
in class AbstractFileSystem
protected Map<String,Object> getConfigurationFromUri(URI uri, org.apache.hadoop.conf.Configuration conf)
AbstractFileSystem
getConfigurationFromUri
in class AbstractFileSystem
uri
- a Alluxio Uri that may contain connection configurationprotected void validateFsUri(URI fsUri) throws IOException, IllegalArgumentException
AbstractFileSystem
validateFsUri
in class AbstractFileSystem
fsUri
- FS UriIOException
IllegalArgumentException
protected String getFsScheme(URI fsUri)
AbstractFileSystem
getFsScheme
in class AbstractFileSystem
fsUri
- file system base URIprotected AlluxioURI getAlluxioPath(org.apache.hadoop.fs.Path path)
AbstractFileSystem
getAlluxioPath
in class AbstractFileSystem
path
- the input pathprotected org.apache.hadoop.fs.Path getFsPath(String fsUriHeader, URIStatus fileStatus)
AbstractFileSystem
getFsPath
in class AbstractFileSystem
fsUriHeader
- FS URI header -> "scheme://authority"fileStatus
- Alluxio file statusCopyright © 2023. All Rights Reserved.