@InterfaceAudience.Public @InterfaceStability.Evolving public class AzureBlobFileSystemStore extends Object implements Closeable, org.apache.hadoop.fs.azurebfs.services.ListingSupport
| Constructor and Description |
|---|
AzureBlobFileSystemStore(URI uri,
boolean isSecureScheme,
Configuration configuration,
org.apache.hadoop.fs.azurebfs.services.AbfsCounters abfsCounters) |
| Modifier and Type | Method and Description |
|---|---|
void |
access(Path path,
FsAction mode) |
void |
breakLease(Path path)
Break any current lease on an ABFS file.
|
void |
close() |
void |
createDirectory(Path path,
FsPermission permission,
FsPermission umask) |
OutputStream |
createFile(Path path,
org.apache.hadoop.fs.FileSystem.Statistics statistics,
boolean overwrite,
FsPermission permission,
FsPermission umask) |
void |
createFilesystem() |
void |
delete(Path path,
boolean recursive) |
void |
deleteFilesystem() |
org.apache.hadoop.fs.azurebfs.AbfsConfiguration |
getAbfsConfiguration() |
AclStatus |
getAclStatus(Path path) |
FileStatus |
getFileStatus(Path path) |
Hashtable<String,String> |
getFilesystemProperties() |
boolean |
getIsNamespaceEnabled() |
Hashtable<String,String> |
getPathStatus(Path path) |
String |
getPrimaryGroup() |
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) |
FileStatus[] |
listStatus(Path path) |
FileStatus[] |
listStatus(Path path,
String startFrom) |
String |
listStatus(Path path,
String startFrom,
List<FileStatus> fileStatuses,
boolean fetchAll,
String continuation) |
void |
modifyAclEntries(Path path,
List<AclEntry> aclSpec) |
org.apache.hadoop.fs.azurebfs.services.AbfsInputStream |
openFileForRead(Path path,
org.apache.hadoop.fs.FileSystem.Statistics statistics) |
org.apache.hadoop.fs.azurebfs.services.AbfsInputStream |
openFileForRead(Path path,
Optional<Configuration> options,
org.apache.hadoop.fs.FileSystem.Statistics statistics) |
OutputStream |
openFileForWrite(Path path,
org.apache.hadoop.fs.FileSystem.Statistics statistics,
boolean overwrite) |
void |
removeAcl(Path path) |
void |
removeAclEntries(Path path,
List<AclEntry> aclSpec) |
void |
removeDefaultAcl(Path path) |
void |
rename(Path source,
Path destination) |
void |
setAcl(Path path,
List<AclEntry> aclSpec) |
void |
setFilesystemProperties(Hashtable<String,String> properties) |
void |
setOwner(Path path,
String owner,
String group) |
void |
setPathProperties(Path path,
Hashtable<String,String> properties) |
void |
setPermission(Path path,
FsPermission permission) |
public AzureBlobFileSystemStore(URI uri, boolean isSecureScheme, Configuration configuration, org.apache.hadoop.fs.azurebfs.services.AbfsCounters abfsCounters) throws IOException
IOExceptionpublic boolean isAppendBlobKey(String key)
public String getUser()
public String getPrimaryGroup()
public void close()
throws IOException
close in interface Closeableclose in interface AutoCloseableIOExceptionpublic boolean getIsNamespaceEnabled()
throws AzureBlobFileSystemException
AzureBlobFileSystemExceptionpublic org.apache.hadoop.fs.azurebfs.AbfsConfiguration getAbfsConfiguration()
public Hashtable<String,String> getFilesystemProperties() throws AzureBlobFileSystemException
AzureBlobFileSystemExceptionpublic void setFilesystemProperties(Hashtable<String,String> properties) throws AzureBlobFileSystemException
AzureBlobFileSystemExceptionpublic Hashtable<String,String> getPathStatus(Path path) throws AzureBlobFileSystemException
AzureBlobFileSystemExceptionpublic void setPathProperties(Path path, Hashtable<String,String> properties) throws AzureBlobFileSystemException
AzureBlobFileSystemExceptionpublic void createFilesystem()
throws AzureBlobFileSystemException
AzureBlobFileSystemExceptionpublic void deleteFilesystem()
throws AzureBlobFileSystemException
AzureBlobFileSystemExceptionpublic OutputStream createFile(Path path, org.apache.hadoop.fs.FileSystem.Statistics statistics, boolean overwrite, FsPermission permission, FsPermission umask) throws AzureBlobFileSystemException
AzureBlobFileSystemExceptionpublic void createDirectory(Path path, FsPermission permission, FsPermission umask) throws AzureBlobFileSystemException
AzureBlobFileSystemExceptionpublic org.apache.hadoop.fs.azurebfs.services.AbfsInputStream openFileForRead(Path path, org.apache.hadoop.fs.FileSystem.Statistics statistics) throws AzureBlobFileSystemException
AzureBlobFileSystemExceptionpublic org.apache.hadoop.fs.azurebfs.services.AbfsInputStream openFileForRead(Path path, Optional<Configuration> options, org.apache.hadoop.fs.FileSystem.Statistics statistics) throws AzureBlobFileSystemException
AzureBlobFileSystemExceptionpublic OutputStream openFileForWrite(Path path, org.apache.hadoop.fs.FileSystem.Statistics statistics, boolean overwrite) throws AzureBlobFileSystemException
AzureBlobFileSystemExceptionpublic void breakLease(Path path) throws AzureBlobFileSystemException
path - file nameAzureBlobFileSystemException - on any exception while breaking the leasepublic void rename(Path source, Path destination) throws AzureBlobFileSystemException
AzureBlobFileSystemExceptionpublic void delete(Path path, boolean recursive) throws AzureBlobFileSystemException
AzureBlobFileSystemExceptionpublic FileStatus getFileStatus(Path path) throws IOException
IOExceptionpublic FileStatus[] listStatus(Path path) throws IOException
listStatus in interface org.apache.hadoop.fs.azurebfs.services.ListingSupportpath - The list path.IOException - in case of error@InterfaceStability.Unstable public FileStatus[] listStatus(Path path, String startFrom) 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".IOException - in case of errorpublic String listStatus(Path path, String startFrom, List<FileStatus> fileStatuses, boolean fetchAll, String continuation) 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.IOException - in case of errorpublic void setOwner(Path path, String owner, String group) throws AzureBlobFileSystemException
AzureBlobFileSystemExceptionpublic void setPermission(Path path, FsPermission permission) throws AzureBlobFileSystemException
AzureBlobFileSystemExceptionpublic void modifyAclEntries(Path path, List<AclEntry> aclSpec) throws AzureBlobFileSystemException
AzureBlobFileSystemExceptionpublic void removeAclEntries(Path path, List<AclEntry> aclSpec) throws AzureBlobFileSystemException
AzureBlobFileSystemExceptionpublic void removeDefaultAcl(Path path) throws AzureBlobFileSystemException
AzureBlobFileSystemExceptionpublic void removeAcl(Path path) throws AzureBlobFileSystemException
AzureBlobFileSystemExceptionpublic void setAcl(Path path, List<AclEntry> aclSpec) throws AzureBlobFileSystemException
AzureBlobFileSystemExceptionpublic AclStatus getAclStatus(Path path) throws IOException
IOExceptionpublic void access(Path path, FsAction mode) throws AzureBlobFileSystemException
AzureBlobFileSystemExceptionpublic boolean isAtomicRenameKey(String key)
public boolean isInfiniteLeaseKey(String key)
Copyright © 2021 Apache Software Foundation. All rights reserved.