@InterfaceAudience.Public @InterfaceStability.Evolving public class AzureBlobFileSystemStore extends Object implements Closeable, org.apache.hadoop.fs.azurebfs.services.ListingSupport
| Constructor and Description |
|---|
AzureBlobFileSystemStore(org.apache.hadoop.fs.azurebfs.AzureBlobFileSystemStore.AzureBlobFileSystemStoreBuilder abfsStoreBuilder)
FileSystem Store for
AzureBlobFileSystem for Abfs operations. |
| Modifier and Type | Method and Description |
|---|---|
void |
access(Path path,
FsAction mode,
org.apache.hadoop.fs.azurebfs.utils.TracingContext tracingContext) |
void |
breakLease(Path path,
org.apache.hadoop.fs.azurebfs.utils.TracingContext tracingContext)
Break any current lease on an ABFS file.
|
void |
close() |
void |
createDirectory(Path path,
FsPermission permission,
FsPermission umask,
org.apache.hadoop.fs.azurebfs.utils.TracingContext tracingContext) |
OutputStream |
createFile(Path path,
org.apache.hadoop.fs.FileSystem.Statistics statistics,
boolean overwrite,
FsPermission permission,
FsPermission umask,
org.apache.hadoop.fs.azurebfs.utils.TracingContext tracingContext) |
void |
createFilesystem(org.apache.hadoop.fs.azurebfs.utils.TracingContext tracingContext) |
void |
delete(Path path,
boolean recursive,
org.apache.hadoop.fs.azurebfs.utils.TracingContext tracingContext) |
void |
deleteFilesystem(org.apache.hadoop.fs.azurebfs.utils.TracingContext tracingContext) |
static String |
extractEtagHeader(org.apache.hadoop.fs.azurebfs.services.AbfsHttpOperation result)
Get the etag header from a response, stripping any quotations.
|
org.apache.hadoop.fs.azurebfs.AbfsConfiguration |
getAbfsConfiguration() |
AclStatus |
getAclStatus(Path path,
org.apache.hadoop.fs.azurebfs.utils.TracingContext tracingContext) |
org.apache.hadoop.fs.azurebfs.services.AbfsClient |
getClient() |
FileStatus |
getFileStatus(Path path,
org.apache.hadoop.fs.azurebfs.utils.TracingContext tracingContext) |
Hashtable<String,String> |
getFilesystemProperties(org.apache.hadoop.fs.azurebfs.utils.TracingContext tracingContext) |
boolean |
getIsNamespaceEnabled(org.apache.hadoop.fs.azurebfs.utils.TracingContext tracingContext) |
Hashtable<String,String> |
getPathStatus(Path path,
org.apache.hadoop.fs.azurebfs.utils.TracingContext tracingContext) |
String |
getPrimaryGroup() |
String |
getRelativePath(Path path) |
String |
getUser() |
boolean |
isAppendBlobKey(String key)
Checks if the given key in Azure Storage should be stored as a page
blob instead of block blob.
|
boolean |
isAtomicRenameKey(String key) |
boolean |
isInfiniteLeaseKey(String key) |
String |
listStatus(Path path,
String startFrom,
List<FileStatus> fileStatuses,
boolean fetchAll,
String continuation,
org.apache.hadoop.fs.azurebfs.utils.TracingContext tracingContext) |
FileStatus[] |
listStatus(Path path,
String startFrom,
org.apache.hadoop.fs.azurebfs.utils.TracingContext tracingContext) |
FileStatus[] |
listStatus(Path path,
org.apache.hadoop.fs.azurebfs.utils.TracingContext tracingContext) |
void |
modifyAclEntries(Path path,
List<AclEntry> aclSpec,
org.apache.hadoop.fs.azurebfs.utils.TracingContext tracingContext) |
org.apache.hadoop.fs.azurebfs.services.AbfsInputStream |
openFileForRead(Path path,
org.apache.hadoop.fs.FileSystem.Statistics statistics,
org.apache.hadoop.fs.azurebfs.utils.TracingContext tracingContext) |
org.apache.hadoop.fs.azurebfs.services.AbfsInputStream |
openFileForRead(Path path,
Optional<org.apache.hadoop.fs.impl.OpenFileParameters> parameters,
org.apache.hadoop.fs.FileSystem.Statistics statistics,
org.apache.hadoop.fs.azurebfs.utils.TracingContext tracingContext) |
OutputStream |
openFileForWrite(Path path,
org.apache.hadoop.fs.FileSystem.Statistics statistics,
boolean overwrite,
org.apache.hadoop.fs.azurebfs.utils.TracingContext tracingContext) |
void |
removeAcl(Path path,
org.apache.hadoop.fs.azurebfs.utils.TracingContext tracingContext) |
void |
removeAclEntries(Path path,
List<AclEntry> aclSpec,
org.apache.hadoop.fs.azurebfs.utils.TracingContext tracingContext) |
void |
removeDefaultAcl(Path path,
org.apache.hadoop.fs.azurebfs.utils.TracingContext tracingContext) |
boolean |
rename(Path source,
Path destination,
org.apache.hadoop.fs.azurebfs.utils.TracingContext tracingContext,
String sourceEtag)
Rename a file or directory.
|
void |
setAcl(Path path,
List<AclEntry> aclSpec,
org.apache.hadoop.fs.azurebfs.utils.TracingContext tracingContext) |
void |
setFilesystemProperties(Hashtable<String,String> properties,
org.apache.hadoop.fs.azurebfs.utils.TracingContext tracingContext) |
void |
setOwner(Path path,
String owner,
String group,
org.apache.hadoop.fs.azurebfs.utils.TracingContext tracingContext) |
void |
setPathProperties(Path path,
Hashtable<String,String> properties,
org.apache.hadoop.fs.azurebfs.utils.TracingContext tracingContext) |
void |
setPermission(Path path,
FsPermission permission,
org.apache.hadoop.fs.azurebfs.utils.TracingContext tracingContext) |
public AzureBlobFileSystemStore(org.apache.hadoop.fs.azurebfs.AzureBlobFileSystemStore.AzureBlobFileSystemStoreBuilder abfsStoreBuilder)
throws IOException
AzureBlobFileSystem for Abfs operations.
Built using the AzureBlobFileSystemStore.AzureBlobFileSystemStoreBuilder with parameters
required.abfsStoreBuilder - Builder for AzureBlobFileSystemStore.IOException - Throw IOE in case of failure during constructing.public boolean isAppendBlobKey(String key)
public String getUser()
public String getPrimaryGroup()
public void close()
throws IOException
close in interface Closeableclose in interface AutoCloseableIOExceptionpublic boolean getIsNamespaceEnabled(org.apache.hadoop.fs.azurebfs.utils.TracingContext tracingContext)
throws AzureBlobFileSystemException
AzureBlobFileSystemExceptionpublic org.apache.hadoop.fs.azurebfs.AbfsConfiguration getAbfsConfiguration()
public Hashtable<String,String> getFilesystemProperties(org.apache.hadoop.fs.azurebfs.utils.TracingContext tracingContext) throws AzureBlobFileSystemException
AzureBlobFileSystemExceptionpublic void setFilesystemProperties(Hashtable<String,String> properties, org.apache.hadoop.fs.azurebfs.utils.TracingContext tracingContext) throws AzureBlobFileSystemException
AzureBlobFileSystemExceptionpublic Hashtable<String,String> getPathStatus(Path path, org.apache.hadoop.fs.azurebfs.utils.TracingContext tracingContext) throws IOException
IOExceptionpublic void setPathProperties(Path path, Hashtable<String,String> properties, org.apache.hadoop.fs.azurebfs.utils.TracingContext tracingContext) throws IOException
IOExceptionpublic void createFilesystem(org.apache.hadoop.fs.azurebfs.utils.TracingContext tracingContext)
throws AzureBlobFileSystemException
AzureBlobFileSystemExceptionpublic void deleteFilesystem(org.apache.hadoop.fs.azurebfs.utils.TracingContext tracingContext)
throws AzureBlobFileSystemException
AzureBlobFileSystemExceptionpublic OutputStream createFile(Path path, org.apache.hadoop.fs.FileSystem.Statistics statistics, boolean overwrite, FsPermission permission, FsPermission umask, org.apache.hadoop.fs.azurebfs.utils.TracingContext tracingContext) throws IOException
IOExceptionpublic void createDirectory(Path path, FsPermission permission, FsPermission umask, org.apache.hadoop.fs.azurebfs.utils.TracingContext tracingContext) throws IOException
IOExceptionpublic org.apache.hadoop.fs.azurebfs.services.AbfsInputStream openFileForRead(Path path, org.apache.hadoop.fs.FileSystem.Statistics statistics, org.apache.hadoop.fs.azurebfs.utils.TracingContext tracingContext) throws IOException
IOExceptionpublic org.apache.hadoop.fs.azurebfs.services.AbfsInputStream openFileForRead(Path path, Optional<org.apache.hadoop.fs.impl.OpenFileParameters> parameters, org.apache.hadoop.fs.FileSystem.Statistics statistics, org.apache.hadoop.fs.azurebfs.utils.TracingContext tracingContext) throws IOException
IOExceptionpublic OutputStream openFileForWrite(Path path, org.apache.hadoop.fs.FileSystem.Statistics statistics, boolean overwrite, org.apache.hadoop.fs.azurebfs.utils.TracingContext tracingContext) throws IOException
IOExceptionpublic void breakLease(Path path, org.apache.hadoop.fs.azurebfs.utils.TracingContext tracingContext) throws AzureBlobFileSystemException
path - file nametracingContext - TracingContext instance to track correlation IDsAzureBlobFileSystemException - on any exception while breaking the leasepublic boolean rename(Path source, Path destination, org.apache.hadoop.fs.azurebfs.utils.TracingContext tracingContext, String sourceEtag) throws IOException
source - path to source filedestination - destination of rename.tracingContext - trace contextsourceEtag - etag of source file. may be null or emptyAzureBlobFileSystemException - failure, excluding any recovery from overload failures.IOExceptionpublic void delete(Path path, boolean recursive, org.apache.hadoop.fs.azurebfs.utils.TracingContext tracingContext) throws AzureBlobFileSystemException
AzureBlobFileSystemExceptionpublic FileStatus getFileStatus(Path path, org.apache.hadoop.fs.azurebfs.utils.TracingContext tracingContext) throws IOException
IOExceptionpublic FileStatus[] listStatus(Path path, org.apache.hadoop.fs.azurebfs.utils.TracingContext tracingContext) throws IOException
listStatus in interface org.apache.hadoop.fs.azurebfs.services.ListingSupportpath - The list path.tracingContext - Tracks identifiers for request headerIOException - in case of error@InterfaceStability.Unstable public FileStatus[] listStatus(Path path, String startFrom, org.apache.hadoop.fs.azurebfs.utils.TracingContext tracingContext) throws IOException
listStatus in interface org.apache.hadoop.fs.azurebfs.services.ListingSupportpath - Path the list path.startFrom - the entry name that list results should start with.
For example, if folder "/folder" contains four files: "afile", "bfile", "hfile", "ifile".
Then listStatus(Path("/folder"), "hfile") will return "/folder/hfile" and "folder/ifile"
Notice that if startFrom is a non-existent entry name, then the list response contains
all entries after this non-existent entry in lexical order:
listStatus(Path("/folder"), "cfile") will return "/folder/hfile" and "/folder/ifile".tracingContext - Tracks identifiers for request headerIOException - in case of errorpublic String listStatus(Path path, String startFrom, List<FileStatus> fileStatuses, boolean fetchAll, String continuation, org.apache.hadoop.fs.azurebfs.utils.TracingContext tracingContext) throws IOException
listStatus in interface org.apache.hadoop.fs.azurebfs.services.ListingSupportpath - The list pathstartFrom - The entry name that list results should start with.
For example, if folder "/folder" contains four
files: "afile", "bfile", "hfile", "ifile". Then
listStatus(Path("/folder"), "hfile") will return
"/folder/hfile" and "folder/ifile" Notice that if
startFrom is a non-existent entry name, then the
list response contains all entries after this
non-existent entry in lexical order: listStatus
(Path("/folder"), "cfile") will return
"/folder/hfile" and "/folder/ifile".fileStatuses - This list has to be filled with the FileStatus objectsfetchAll - flag to indicate if the above list needs to be
filled with just one page os results or the entire
result.continuation - Contiuation token. null means start rom the begining.tracingContext - TracingContext instance to track identifiersIOException - in case of errorpublic void setOwner(Path path, String owner, String group, org.apache.hadoop.fs.azurebfs.utils.TracingContext tracingContext) throws AzureBlobFileSystemException
AzureBlobFileSystemExceptionpublic void setPermission(Path path, FsPermission permission, org.apache.hadoop.fs.azurebfs.utils.TracingContext tracingContext) throws AzureBlobFileSystemException
AzureBlobFileSystemExceptionpublic void modifyAclEntries(Path path, List<AclEntry> aclSpec, org.apache.hadoop.fs.azurebfs.utils.TracingContext tracingContext) throws AzureBlobFileSystemException
AzureBlobFileSystemExceptionpublic void removeAclEntries(Path path, List<AclEntry> aclSpec, org.apache.hadoop.fs.azurebfs.utils.TracingContext tracingContext) throws AzureBlobFileSystemException
AzureBlobFileSystemExceptionpublic void removeDefaultAcl(Path path, org.apache.hadoop.fs.azurebfs.utils.TracingContext tracingContext) throws AzureBlobFileSystemException
AzureBlobFileSystemExceptionpublic void removeAcl(Path path, org.apache.hadoop.fs.azurebfs.utils.TracingContext tracingContext) throws AzureBlobFileSystemException
AzureBlobFileSystemExceptionpublic void setAcl(Path path, List<AclEntry> aclSpec, org.apache.hadoop.fs.azurebfs.utils.TracingContext tracingContext) throws AzureBlobFileSystemException
AzureBlobFileSystemExceptionpublic AclStatus getAclStatus(Path path, org.apache.hadoop.fs.azurebfs.utils.TracingContext tracingContext) throws IOException
IOExceptionpublic void access(Path path, FsAction mode, org.apache.hadoop.fs.azurebfs.utils.TracingContext tracingContext) throws AzureBlobFileSystemException
AzureBlobFileSystemExceptionpublic boolean isAtomicRenameKey(String key)
public boolean isInfiniteLeaseKey(String key)
@VisibleForTesting public org.apache.hadoop.fs.azurebfs.services.AbfsClient getClient()
public static String extractEtagHeader(org.apache.hadoop.fs.azurebfs.services.AbfsHttpOperation result)
result - response to process.Copyright © 2024 Apache Software Foundation. All rights reserved.