java.io.Closeable, java.lang.AutoCloseable, org.apache.hadoop.conf.Configurable, org.apache.hadoop.fs.BulkDeleteSource, org.apache.hadoop.fs.PathCapabilities, org.apache.hadoop.security.token.DelegationTokenIssuer@Public
@Evolving
public class AdlFileSystem
extends org.apache.hadoop.fs.FileSystem
| Modifier and Type | Field | Description |
|---|---|---|
static java.lang.String |
SCHEME |
| Constructor | Description |
|---|---|
AdlFileSystem() |
| Modifier and Type | Method | Description |
|---|---|---|
void |
access(org.apache.hadoop.fs.Path path,
org.apache.hadoop.fs.permission.FsAction mode) |
Checks if the user can access a path.
|
org.apache.hadoop.fs.FSDataOutputStream |
append(org.apache.hadoop.fs.Path f,
int bufferSize,
org.apache.hadoop.util.Progressable progress) |
Append to an existing file (optional operation).
|
void |
concat(org.apache.hadoop.fs.Path trg,
org.apache.hadoop.fs.Path[] srcs) |
Concat existing files together.
|
org.apache.hadoop.fs.FSDataOutputStream |
create(org.apache.hadoop.fs.Path f,
org.apache.hadoop.fs.permission.FsPermission permission,
boolean overwrite,
int bufferSize,
short replication,
long blockSize,
org.apache.hadoop.util.Progressable progress) |
Create call semantic is handled differently in case of ADL.
|
org.apache.hadoop.fs.FSDataOutputStream |
createNonRecursive(org.apache.hadoop.fs.Path f,
org.apache.hadoop.fs.permission.FsPermission permission,
java.util.EnumSet<org.apache.hadoop.fs.CreateFlag> flags,
int bufferSize,
short replication,
long blockSize,
org.apache.hadoop.util.Progressable progress) |
Deprecated.
API only for 0.20-append
|
boolean |
delete(org.apache.hadoop.fs.Path path,
boolean recursive) |
Delete a file.
|
static java.lang.String |
getAccountNameFromFQDN(java.lang.String accountFQDN) |
Gets ADL account name from ADL FQDN.
|
org.apache.hadoop.fs.permission.AclStatus |
getAclStatus(org.apache.hadoop.fs.Path path) |
Gets the ACL of a file or directory.
|
com.microsoft.azure.datalake.store.ADLStoreClient |
getAdlClient() |
|
long |
getBlockSize(org.apache.hadoop.fs.Path f) |
Deprecated.
Use getFileStatus() instead
|
org.apache.hadoop.fs.ContentSummary |
getContentSummary(org.apache.hadoop.fs.Path f) |
Return the
ContentSummary of a given Path. |
protected AzureADTokenProvider |
getCustomAccessTokenProvider(org.apache.hadoop.conf.Configuration conf) |
This method is provided for convenience for derived classes to define
custom
AzureADTokenProvider instance. |
long |
getDefaultBlockSize() |
Deprecated.
use
getDefaultBlockSize(Path) instead |
long |
getDefaultBlockSize(org.apache.hadoop.fs.Path f) |
Return the number of bytes that large input files should be optimally
be split into to minimize i/o time.
|
int |
getDefaultPort() |
|
org.apache.hadoop.fs.FileStatus |
getFileStatus(org.apache.hadoop.fs.Path f) |
Return a file status object that represents the path.
|
org.apache.hadoop.fs.Path |
getHomeDirectory() |
Constructing home directory locally is fine as long as Hadoop
local user name and ADL user name relationship story is not fully baked
yet.
|
short |
getReplication(org.apache.hadoop.fs.Path src) |
Deprecated.
Use getFileStatus() instead
|
java.lang.String |
getScheme() |
|
protected java.lang.String |
getTransportScheme() |
|
java.net.URI |
getUri() |
|
org.apache.hadoop.fs.Path |
getWorkingDirectory() |
Get the current working directory for the given file system.
|
boolean |
hasPathCapability(org.apache.hadoop.fs.Path path,
java.lang.String capability) |
|
void |
initialize(java.net.URI storeUri,
org.apache.hadoop.conf.Configuration originalConf) |
Called after a new FileSystem instance is constructed.
|
org.apache.hadoop.fs.FileStatus[] |
listStatus(org.apache.hadoop.fs.Path f) |
List the statuses of the files/directories in the given path if the path is
a directory.
|
boolean |
mkdirs(org.apache.hadoop.fs.Path path,
org.apache.hadoop.fs.permission.FsPermission permission) |
Make the given file and all non-existent parents into
directories.
|
void |
modifyAclEntries(org.apache.hadoop.fs.Path path,
java.util.List<org.apache.hadoop.fs.permission.AclEntry> aclSpec) |
Modifies ACL entries of files and directories.
|
org.apache.hadoop.fs.FSDataInputStream |
open(org.apache.hadoop.fs.Path f,
int buffersize) |
Open call semantic is handled differently in case of ADL.
|
static org.apache.hadoop.conf.Configuration |
propagateAccountOptions(org.apache.hadoop.conf.Configuration source,
java.lang.String accountName) |
Propagates account-specific settings into generic ADL configuration keys.
|
void |
removeAcl(org.apache.hadoop.fs.Path path) |
Removes all but the base ACL entries of files and directories.
|
void |
removeAclEntries(org.apache.hadoop.fs.Path path,
java.util.List<org.apache.hadoop.fs.permission.AclEntry> aclSpec) |
Removes ACL entries from files and directories.
|
void |
removeDefaultAcl(org.apache.hadoop.fs.Path path) |
Removes all default ACL entries from files and directories.
|
boolean |
rename(org.apache.hadoop.fs.Path src,
org.apache.hadoop.fs.Path dst) |
Renames Path src to Path dst.
|
void |
rename(org.apache.hadoop.fs.Path src,
org.apache.hadoop.fs.Path dst,
org.apache.hadoop.fs.Options.Rename... options) |
Deprecated.
|
void |
setAcl(org.apache.hadoop.fs.Path path,
java.util.List<org.apache.hadoop.fs.permission.AclEntry> aclSpec) |
Fully replaces ACL of files and directories, discarding all existing
entries.
|
void |
setOwner(org.apache.hadoop.fs.Path path,
java.lang.String owner,
java.lang.String group) |
Set owner of a path (i.e.
|
void |
setPermission(org.apache.hadoop.fs.Path path,
org.apache.hadoop.fs.permission.FsPermission permission) |
Set permission of a path.
|
boolean |
setReplication(org.apache.hadoop.fs.Path p,
short replication) |
Azure data lake does not support user configuration for data replication
hence not leaving system to query on
azure data lake.
|
void |
setUserGroupRepresentationAsUPN(boolean enableUPN) |
|
void |
setWorkingDirectory(org.apache.hadoop.fs.Path dir) |
Set the current working directory for the given file system.
|
boolean |
supportsSymlinks() |
append, append, append, append, appendFile, areSymlinksEnabled, cancelDeleteOnExit, canonicalizeUri, checkPath, clearStatistics, close, closeAll, closeAllForUGI, completeLocalOutput, copyFromLocalFile, copyFromLocalFile, copyFromLocalFile, copyFromLocalFile, copyToLocalFile, copyToLocalFile, copyToLocalFile, create, create, create, create, create, create, create, create, create, create, create, create, createBulkDelete, createDataInputStreamBuilder, createDataInputStreamBuilder, createDataOutputStreamBuilder, createFid, createFile, createMultipartUploader, createNewFile, createNonRecursive, createNonRecursive, createPathHandle, createPathId, createSnapshot, createSnapshot, createSymlink, delete, deleteFid, deleteOnExit, deleteSnapshot, enableSymlinks, exists, fixRelativePart, get, get, get, getAdditionalTokenIssuers, getAllStatistics, getAllStoragePolicies, getCanonicalServiceName, getCanonicalUri, getChildFileSystems, getDefaultReplication, getDefaultReplication, getDefaultUri, getDelegationToken, getEnclosingRoot, getFileBlockLocations, getFileBlockLocations, getFileChecksum, getFileChecksum, getFileLinkStatus, getFileSystemClass, getFSofPath, getGlobalStorageStatistics, getInitialWorkingDirectory, getJobTrackerAddrs, getLength, getLinkTarget, getLocal, getName, getNamed, getPathHandle, getQuotaUsage, getServerDefaults, getServerDefaults, getStatistics, getStatistics, getStatus, getStatus, getStoragePolicy, getStorageStatistics, getTrashRoot, getTrashRoots, getUsed, getUsed, getXAttr, getXAttrs, getXAttrs, getZkConnectString, globStatus, globStatus, isDirectory, isFile, listCorruptFileBlocks, listFiles, listLocatedStatus, listLocatedStatus, listStatus, listStatus, listStatus, listStatusBatch, listStatusIterator, listXAttrs, makeQualified, mkdirs, mkdirs, mkdirsFid, mkdirsFid, moveFromLocalFile, moveFromLocalFile, moveToLocalFile, msync, newInstance, newInstance, newInstance, newInstanceLocal, open, open, open, openFid, openFid, openFid2, openFile, openFile, openFileWithOptions, openFileWithOptions, primitiveCreate, primitiveMkdir, primitiveMkdir, printStatistics, processDeleteOnExit, removeXAttr, renameSnapshot, resolveLink, resolvePath, satisfyStoragePolicy, setDefaultUri, setDefaultUri, setOwnerFid, setQuota, setQuotaByStorageType, setStoragePolicy, setTimes, setVerifyChecksum, setWriteChecksum, setXAttr, setXAttr, startLocalOutput, truncate, unsetStoragePolicypublic static final java.lang.String SCHEME
public java.lang.String getScheme()
getScheme in class org.apache.hadoop.fs.FileSystempublic java.net.URI getUri()
getUri in class org.apache.hadoop.fs.FileSystempublic int getDefaultPort()
getDefaultPort in class org.apache.hadoop.fs.FileSystempublic boolean supportsSymlinks()
supportsSymlinks in class org.apache.hadoop.fs.FileSystempublic void initialize(java.net.URI storeUri,
org.apache.hadoop.conf.Configuration originalConf)
throws java.io.IOException
initialize in class org.apache.hadoop.fs.FileSystemstoreUri - a uri whose authority section names the host, port,
etc. for this FileSystemoriginalConf - the configuration to use for the FS. The account-
specific options are patched over the base ones
before any use is made of the config.java.io.IOExceptionprotected AzureADTokenProvider getCustomAccessTokenProvider(org.apache.hadoop.conf.Configuration conf) throws java.io.IOException
AzureADTokenProvider instance.
In order to ensure secure hadoop infrastructure and user context for which
respective AdlFileSystem instance is initialized,
Loading AzureADTokenProvider is not sufficient.
The order of loading AzureADTokenProvider is to first invoke
getCustomAccessTokenProvider(Configuration), If method return null
which means no implementation provided by derived classes, then
configuration object is loaded to retrieve token configuration as specified
is documentation.
Custom token management takes the higher precedence during initialization.conf - Configuration objectAzureADTokenProvider token management
is specified.java.io.IOException - if failed to initialize token provider.@VisibleForTesting public com.microsoft.azure.datalake.store.ADLStoreClient getAdlClient()
public org.apache.hadoop.fs.Path getHomeDirectory()
getHomeDirectory in class org.apache.hadoop.fs.FileSystempublic org.apache.hadoop.fs.FSDataOutputStream create(org.apache.hadoop.fs.Path f,
org.apache.hadoop.fs.permission.FsPermission permission,
boolean overwrite,
int bufferSize,
short replication,
long blockSize,
org.apache.hadoop.util.Progressable progress)
throws java.io.IOException
create in class org.apache.hadoop.fs.FileSystemf - File pathpermission - Access permission for the newly created fileoverwrite - Remove existing file and recreate new one if true
otherwise throw error if file existbufferSize - Buffer size, ADL backend does not honourreplication - Replication count, ADL backend does not honourblockSize - Block size, ADL backend does not honourprogress - Progress indicatorjava.io.IOException - when system error, internal server error or user errorpublic org.apache.hadoop.fs.FSDataOutputStream createNonRecursive(org.apache.hadoop.fs.Path f,
org.apache.hadoop.fs.permission.FsPermission permission,
java.util.EnumSet<org.apache.hadoop.fs.CreateFlag> flags,
int bufferSize,
short replication,
long blockSize,
org.apache.hadoop.util.Progressable progress)
throws java.io.IOException
createNonRecursive in class org.apache.hadoop.fs.FileSystemf - the file name to openpermission - Access permission for the newly created fileflags - CreateFlags to use for this stream.bufferSize - the size of the buffer to be used. ADL backend does
not honourreplication - required block replication for the file. ADL backend
does not honourblockSize - Block size, ADL backend does not honourprogress - Progress indicatorjava.io.IOException - when system error, internal server error or user errorsetPermission(Path, FsPermission)public org.apache.hadoop.fs.FSDataOutputStream append(org.apache.hadoop.fs.Path f,
int bufferSize,
org.apache.hadoop.util.Progressable progress)
throws java.io.IOException
append in class org.apache.hadoop.fs.FileSystemf - the existing file to be appended.bufferSize - the size of the buffer to be used. ADL backend does
not honourprogress - Progress indicatorjava.io.IOException - when system error, internal server error or user errorpublic boolean setReplication(org.apache.hadoop.fs.Path p,
short replication)
throws java.io.IOException
setReplication in class org.apache.hadoop.fs.FileSystemp - Not honouredreplication - Not honouredjava.io.IOException - No exception would not thrown in this case however
aligning with parent api definition.public org.apache.hadoop.fs.FSDataInputStream open(org.apache.hadoop.fs.Path f,
int buffersize)
throws java.io.IOException
open in class org.apache.hadoop.fs.FileSystemf - File pathbuffersize - Buffer size, Not honouredjava.io.IOException - when system error, internal server error or user errorpublic org.apache.hadoop.fs.FileStatus getFileStatus(org.apache.hadoop.fs.Path f)
throws java.io.IOException
getFileStatus in class org.apache.hadoop.fs.FileSystemf - The path we want information fromjava.io.IOException - when the path does not exist or any other error;
IOException see specific implementationpublic org.apache.hadoop.fs.FileStatus[] listStatus(org.apache.hadoop.fs.Path f)
throws java.io.IOException
listStatus in class org.apache.hadoop.fs.FileSystemf - given pathjava.io.IOException - when the path does not exist or any other error;
IOException see specific implementationpublic boolean rename(org.apache.hadoop.fs.Path src,
org.apache.hadoop.fs.Path dst)
throws java.io.IOException
rename in class org.apache.hadoop.fs.FileSystemsrc - path to be renameddst - new path after renamejava.io.IOException - on failure@Deprecated
public void rename(org.apache.hadoop.fs.Path src,
org.apache.hadoop.fs.Path dst,
org.apache.hadoop.fs.Options.Rename... options)
throws java.io.IOException
rename in class org.apache.hadoop.fs.FileSystemjava.io.IOExceptionpublic void concat(org.apache.hadoop.fs.Path trg,
org.apache.hadoop.fs.Path[] srcs)
throws java.io.IOException
concat in class org.apache.hadoop.fs.FileSystemtrg - the path to the target destination.srcs - the paths to the sources to use for the concatenation.java.io.IOException - when system error, internal server error or user errorpublic boolean delete(org.apache.hadoop.fs.Path path,
boolean recursive)
throws java.io.IOException
delete in class org.apache.hadoop.fs.FileSystempath - the path to delete.recursive - if path is a directory and set to
true, the directory is deleted else throws an exception.
In case of a file the recursive can be set to either
true or false.java.io.IOException - when system error, internal server error or user errorpublic boolean mkdirs(org.apache.hadoop.fs.Path path,
org.apache.hadoop.fs.permission.FsPermission permission)
throws java.io.IOException
mkdirs in class org.apache.hadoop.fs.FileSystempath - path to createpermission - to apply to pathjava.io.IOExceptionpublic void setOwner(org.apache.hadoop.fs.Path path,
java.lang.String owner,
java.lang.String group)
throws java.io.IOException
setOwner in class org.apache.hadoop.fs.FileSystempath - The pathowner - If it is null, the original username remains unchanged.group - If it is null, the original groupname remains unchanged.java.io.IOExceptionpublic void setPermission(org.apache.hadoop.fs.Path path,
org.apache.hadoop.fs.permission.FsPermission permission)
throws java.io.IOException
setPermission in class org.apache.hadoop.fs.FileSystempath - The pathpermission - Access permissionjava.io.IOExceptionpublic void modifyAclEntries(org.apache.hadoop.fs.Path path,
java.util.List<org.apache.hadoop.fs.permission.AclEntry> aclSpec)
throws java.io.IOException
modifyAclEntries in class org.apache.hadoop.fs.FileSystempath - Path to modifyaclSpec - List of AclEntry describing modificationsjava.io.IOException - if an ACL could not be modifiedpublic void removeAclEntries(org.apache.hadoop.fs.Path path,
java.util.List<org.apache.hadoop.fs.permission.AclEntry> aclSpec)
throws java.io.IOException
removeAclEntries in class org.apache.hadoop.fs.FileSystempath - Path to modifyaclSpec - List of AclEntry describing entries to removejava.io.IOException - if an ACL could not be modifiedpublic void removeDefaultAcl(org.apache.hadoop.fs.Path path)
throws java.io.IOException
removeDefaultAcl in class org.apache.hadoop.fs.FileSystempath - Path to modifyjava.io.IOException - if an ACL could not be modifiedpublic void removeAcl(org.apache.hadoop.fs.Path path)
throws java.io.IOException
removeAcl in class org.apache.hadoop.fs.FileSystempath - Path to modifyjava.io.IOException - if an ACL could not be removedpublic void setAcl(org.apache.hadoop.fs.Path path,
java.util.List<org.apache.hadoop.fs.permission.AclEntry> aclSpec)
throws java.io.IOException
setAcl in class org.apache.hadoop.fs.FileSystempath - Path to modifyaclSpec - List of AclEntry describing modifications, must include
entries for user, group, and others for compatibility with
permission bits.java.io.IOException - if an ACL could not be modifiedpublic org.apache.hadoop.fs.permission.AclStatus getAclStatus(org.apache.hadoop.fs.Path path)
throws java.io.IOException
getAclStatus in class org.apache.hadoop.fs.FileSystempath - Path to getjava.io.IOException - if an ACL could not be readpublic void access(org.apache.hadoop.fs.Path path,
org.apache.hadoop.fs.permission.FsAction mode)
throws java.io.IOException
AccessControlException.access in class org.apache.hadoop.fs.FileSystempath - Path to checkmode - type of access to checkorg.apache.hadoop.security.AccessControlException - if access is deniedjava.io.FileNotFoundException - if the path does not existjava.io.IOException - see specific implementationpublic org.apache.hadoop.fs.ContentSummary getContentSummary(org.apache.hadoop.fs.Path f)
throws java.io.IOException
ContentSummary of a given Path.getContentSummary in class org.apache.hadoop.fs.FileSystemf - path to usejava.io.IOException@VisibleForTesting protected java.lang.String getTransportScheme()
public org.apache.hadoop.fs.Path getWorkingDirectory()
getWorkingDirectory in class org.apache.hadoop.fs.FileSystempublic void setWorkingDirectory(org.apache.hadoop.fs.Path dir)
setWorkingDirectory in class org.apache.hadoop.fs.FileSystemdir - Working directory path.@Deprecated public long getDefaultBlockSize()
getDefaultBlockSize(Path) insteadgetDefaultBlockSize in class org.apache.hadoop.fs.FileSystempublic long getDefaultBlockSize(org.apache.hadoop.fs.Path f)
getDefaultBlockSize in class org.apache.hadoop.fs.FileSystemf - path of file@Deprecated
public long getBlockSize(org.apache.hadoop.fs.Path f)
throws java.io.IOException
getBlockSize in class org.apache.hadoop.fs.FileSystemjava.io.IOException@Deprecated public short getReplication(org.apache.hadoop.fs.Path src)
getReplication in class org.apache.hadoop.fs.FileSystemsrc - file name@VisibleForTesting public void setUserGroupRepresentationAsUPN(boolean enableUPN)
public static java.lang.String getAccountNameFromFQDN(java.lang.String accountFQDN)
accountFQDN - ADL account fqdnpublic static org.apache.hadoop.conf.Configuration propagateAccountOptions(org.apache.hadoop.conf.Configuration source,
java.lang.String accountName)
fs.adl.account.${account_name}.key to
fs.adl.key, for all values of "key"
The source of the updated property is set to the key name of the account
property, to aid in diagnostics of where things came from.
Returns a new configuration. Why the clone?
You can use the same conf for different filesystems, and the original
values are not updated.source - Source Configuration objectaccountName - account name. Must not be emptypublic boolean hasPathCapability(org.apache.hadoop.fs.Path path,
java.lang.String capability)
throws java.io.IOException
hasPathCapability in interface org.apache.hadoop.fs.PathCapabilitieshasPathCapability in class org.apache.hadoop.fs.FileSystemjava.io.IOExceptionCopyright © 2008–2025 Apache Software Foundation. All rights reserved.