@ThreadSafe public class AdlUnderFileSystem extends HdfsUnderFileSystem
UnderFileSystem.Factory, UnderFileSystem.SpaceType
CHECKSUM_COMBINE_MODE, HADOOP_AUTH_METHOD, HDFS_ACL_PROVIDER_CLASS, HDFS_EC_CODEC_REGISTRY_CLASS, HDFS_EC_MIN_VERSION, HDFS_USER, JAVAX_WS_RS_CORE_MEDIA_TYPE, KRB_KEYTAB_LOGIN_AUTO_RENEW, KRB5_CONF_FILE, MAX_TRY, mHdfsAclProvider
EMPTY_ACL, mUfsConf, mUri
Constructor and Description |
---|
AdlUnderFileSystem(AlluxioURI ufsUri,
UnderFileSystemConfiguration conf,
org.apache.hadoop.conf.Configuration adlConf)
Constructs a new Adl
UnderFileSystem . |
Modifier and Type | Method and Description |
---|---|
static org.apache.hadoop.conf.Configuration |
createConfiguration(UnderFileSystemConfiguration conf)
Prepares the configuration for this Adl as an HDFS configuration.
|
static AdlUnderFileSystem |
createInstance(AlluxioURI uri,
UnderFileSystemConfiguration conf)
Factory method to construct a new Adl
UnderFileSystem . |
long |
getBlockSizeByte(String path)
Gets the block size of a file in under file system, in bytes.
|
List<String> |
getFileLocations(String path)
Gets the list of locations of the indicated path.
|
List<String> |
getFileLocations(String path,
FileLocationOptions options)
Gets the list of locations of the indicated path given options.
|
UfsStatus |
getStatus(String path,
GetStatusOptions options)
Gets the file or directory status.
|
String |
getUnderFSType()
Returns the name of the under filesystem implementation.
|
void |
setMode(String path,
short mode)
Changes posix file mode.
|
void |
setOwner(String path,
String user,
String group)
Sets the user and group of the given path.
|
cleanup, close, connectFromMaster, connectFromWorker, create, createDirect, deleteDirectory, deleteFile, exists, getAclPair, getDirectoryStatus, getFileStatus, getFs, getSpace, isDirectory, isFile, isSeekable, listStatus, mkdirs, open, openPositionRead, renameDirectory, renameFile, setAclEntries, supportsFlush
createNonexistingFile, createNonexistingFile, deleteExistingDirectory, deleteExistingDirectory, deleteExistingFile, getExistingDirectoryStatus, getExistingFileStatus, getExistingStatus, isExistingDirectory, openExistingFile, openExistingFile, renameRenamableDirectory, renameRenamableFile
create, deleteDirectory, getConfiguration, getFingerprint, getOperationMode, getParsedFingerprint, getParsedFingerprint, getPhysicalStores, isObjectStorage, listStatus, listStatusIterable, mkdirs, open, performListingAsync, resolveUri, validatePath
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
create, createNonexistingFile, createNonexistingFile, deleteDirectory, deleteExistingDirectory, deleteExistingDirectory, deleteExistingFile, getConfiguration, getExistingDirectoryStatus, getExistingFileStatus, getExistingStatus, getFileStatus, getFingerprint, getOperationMode, getParsedFingerprint, getParsedFingerprint, getPhysicalStores, getStatus, getTemporaryToken, isExistingDirectory, isObjectStorage, isTemporaryConnectionToken, listStatus, listStatuses, listStatusIterable, mkdirs, open, openExistingFile, openExistingFile, refreshTemporaryToken, renameRenamableDirectory, renameRenamableFile, resolveUri, setTemporaryTokenRefreshContext
performListingAsync
public AdlUnderFileSystem(AlluxioURI ufsUri, UnderFileSystemConfiguration conf, org.apache.hadoop.conf.Configuration adlConf)
UnderFileSystem
.ufsUri
- the AlluxioURI
for this UFSconf
- the configuration for this UFSadlConf
- the configuration for this Adl UFSpublic static org.apache.hadoop.conf.Configuration createConfiguration(UnderFileSystemConfiguration conf)
conf
- the configuration for this UFSpublic static AdlUnderFileSystem createInstance(AlluxioURI uri, UnderFileSystemConfiguration conf)
UnderFileSystem
.uri
- the AlluxioURI
for this UFSconf
- the configuration for this UFSUnderFileSystem
instancepublic String getUnderFSType()
UnderFileSystem
getUnderFSType
in interface UnderFileSystem
getUnderFSType
in class HdfsUnderFileSystem
public long getBlockSizeByte(String path) throws IOException
UnderFileSystem
getBlockSizeByte
in interface UnderFileSystem
getBlockSizeByte
in class HdfsUnderFileSystem
path
- the file nameIOException
public UfsStatus getStatus(String path, GetStatusOptions options) throws IOException
UnderFileSystem
getStatus
in interface UnderFileSystem
getStatus
in class HdfsUnderFileSystem
path
- the path to get the statusoptions
- method optionsFileNotFoundException
- when the path does not existIOException
public void setOwner(String path, String user, String group)
UnderFileSystem
setOwner
in interface UnderFileSystem
setOwner
in class HdfsUnderFileSystem
path
- the path of the fileuser
- the new owner to set, unchanged if nullgroup
- the new group to set, unchanged if nullpublic void setMode(String path, short mode)
UnderFileSystem
setMode
in interface UnderFileSystem
setMode
in class HdfsUnderFileSystem
path
- the path of the filemode
- the mode to set in short format, e.g. 0777public List<String> getFileLocations(String path) throws IOException
UnderFileSystem
getFileLocations
in interface UnderFileSystem
getFileLocations
in class HdfsUnderFileSystem
path
- the file nameIOException
public List<String> getFileLocations(String path, FileLocationOptions options) throws IOException
UnderFileSystem
getFileLocations
in interface UnderFileSystem
getFileLocations
in class HdfsUnderFileSystem
path
- the file nameoptions
- method optionsIOException
Copyright © 2023. All Rights Reserved.