@NotThreadSafe public 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.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 java.util.Map<java.lang.String,java.lang.Object> |
getConfigurationFromUri(java.net.URI uri,
org.apache.hadoop.conf.Configuration conf)
Gets the connection configuration from the input uri.
|
protected org.apache.hadoop.fs.Path |
getFsPath(java.lang.String fsUriHeader,
URIStatus fileStatus)
Used to get FS native path from Alluxio file status.
|
protected java.lang.String |
getFsScheme(java.net.URI fsUri)
Used to get FS scheme.
|
java.lang.String |
getScheme()
Gets the URI scheme that maps to the
FileSystem. |
protected boolean |
isZookeeperMode() |
protected void |
validateFsUri(java.net.URI fsUri)
Validates given FS base URI for scheme and authority.
|
access, append, canonicalizeUri, close, create, createNonRecursive, delete, delete, getCanonicalServiceName, getDefaultBlockSize, getDefaultPort, getDefaultReplication, getFileBlockLocations, getFileStatus, getUri, getWorkingDirectory, initialize, initialize, listStatus, mkdirs, open, rename, setOwner, setPermission, setReplication, setWorkingDirectoryappend, append, appendFile, areSymlinksEnabled, cancelDeleteOnExit, 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, createMultipartUploader, createNewFile, createNonRecursive, createNonRecursive, createPathHandle, createSnapshot, createSnapshot, createSymlink, deleteOnExit, deleteSnapshot, enableSymlinks, exists, fixRelativePart, get, get, get, getAclStatus, getAdditionalTokenIssuers, getAllStatistics, getAllStoragePolicies, getBlockSize, getCanonicalUri, getChildFileSystems, getContentSummary, getDefaultBlockSize, 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, msync, 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, unsetStoragePolicypublic FileSystem()
FileSystem.public FileSystem(FileSystem fileSystem)
FileSystem instance with a
specified FileSystem handler for tests.fileSystem - handler to file systempublic java.lang.String getScheme()
AbstractFileSystemFileSystem. This was
introduced in Hadoop 2.x as a means to make loading new FileSystem
s simpler.getScheme in class AbstractFileSystemFileSystem.createFileSystem(java.net.URI,
org.apache.hadoop.conf.Configuration)protected boolean isZookeeperMode()
isZookeeperMode in class AbstractFileSystemprotected java.util.Map<java.lang.String,java.lang.Object> getConfigurationFromUri(java.net.URI uri,
org.apache.hadoop.conf.Configuration conf)
AbstractFileSystemgetConfigurationFromUri in class AbstractFileSystemuri - an Alluxio Uri that may contain connection configurationprotected void validateFsUri(java.net.URI fsUri)
throws java.io.IOException,
java.lang.IllegalArgumentException
AbstractFileSystemvalidateFsUri in class AbstractFileSystemfsUri - FS Urijava.io.IOExceptionjava.lang.IllegalArgumentExceptionprotected java.lang.String getFsScheme(java.net.URI fsUri)
AbstractFileSystemgetFsScheme in class AbstractFileSystemfsUri - file system base URIprotected AlluxioURI getAlluxioPath(org.apache.hadoop.fs.Path path)
AbstractFileSystemgetAlluxioPath in class AbstractFileSystempath - the input pathprotected org.apache.hadoop.fs.Path getFsPath(java.lang.String fsUriHeader,
URIStatus fileStatus)
AbstractFileSystemgetFsPath in class AbstractFileSystemfsUriHeader - FS URI header -> "scheme://authority"fileStatus - Alluxio file statusCopyright © 2023. All Rights Reserved.