@InterfaceAudience.Private public class AzureNativeFileSystemStore extends Object
Modifier and Type | Field and Description |
---|---|
static int |
DEFAULT_DOWNLOAD_BLOCK_SIZE |
static int |
DEFAULT_UPLOAD_BLOCK_SIZE |
static String |
KEY_ATOMIC_RENAME_DIRECTORIES
Configuration key to indicate the set of directories in WASB where
we should do atomic folder rename synchronized with createNonRecursive.
|
static String |
KEY_PAGE_BLOB_DIRECTORIES
Configuration key to indicate the set of directories in WASB where we
should store files as page blobs instead of block blobs.
|
static org.apache.commons.logging.Log |
LOG |
Constructor and Description |
---|
AzureNativeFileSystemStore() |
Modifier and Type | Method and Description |
---|---|
SelfRenewingLease |
acquireLease(String key)
Get a lease on the blob identified by key.
|
void |
changePermissionStatus(String key,
org.apache.hadoop.fs.permission.PermissionStatus newPermission)
Changes the permission status on the given key.
|
void |
close() |
void |
delete(String key) |
void |
delete(String key,
SelfRenewingLease lease) |
void |
dump()
Diagnostic method to dump state to the console.
|
protected void |
finalize() |
static String |
getAccountKeyFromConfiguration(String accountName,
org.apache.hadoop.conf.Configuration conf) |
BandwidthGaugeUpdater |
getBandwidthGaugeUpdater() |
String |
getLinkInFileMetadata(String key)
If the blob with the given key exists and has a link in its metadata to a
temporary file (see storeEmptyLinkFile), this method returns the key to
that temporary file.
|
void |
initialize(URI uri,
org.apache.hadoop.conf.Configuration conf,
AzureFileSystemInstrumentation instrumentation)
Method for the URI and configuration object necessary to create a storage
session with an Azure session.
|
boolean |
isAtomicRenameKey(String key)
Checks if the given key in Azure storage should have synchronized
atomic folder rename createNonRecursive implemented.
|
boolean |
isKeyForDirectorySet(String key,
Set<String> dirSet) |
boolean |
isPageBlobKey(String key)
Checks if the given key in Azure Storage should be stored as a page
blob instead of block blob.
|
org.apache.hadoop.fs.azure.PartialListing |
list(String prefix,
int maxListingCount,
int maxListingDepth) |
org.apache.hadoop.fs.azure.PartialListing |
list(String prefix,
int maxListingCount,
int maxListingDepth,
String priorLastKey) |
org.apache.hadoop.fs.azure.PartialListing |
listAll(String prefix,
int maxListingCount,
int maxListingDepth,
String priorLastKey) |
void |
purge(String prefix)
Delete all keys with the given prefix.
|
void |
rename(String srcKey,
String dstKey) |
void |
rename(String srcKey,
String dstKey,
boolean acquireLease,
SelfRenewingLease existingLease) |
DataInputStream |
retrieve(String key) |
DataInputStream |
retrieve(String key,
long startByteOffset) |
org.apache.hadoop.fs.azure.FileMetadata |
retrieveMetadata(String key) |
void |
storeEmptyFolder(String key,
org.apache.hadoop.fs.permission.PermissionStatus permissionStatus) |
void |
storeEmptyLinkFile(String key,
String tempBlobKey,
org.apache.hadoop.fs.permission.PermissionStatus permissionStatus)
Stores an empty blob that's linking to the temporary file where're we're
uploading the initial data.
|
DataOutputStream |
storefile(String key,
org.apache.hadoop.fs.permission.PermissionStatus permissionStatus) |
void |
updateFolderLastModifiedTime(String key,
Date lastModified,
SelfRenewingLease folderLease) |
void |
updateFolderLastModifiedTime(String key,
SelfRenewingLease folderLease) |
public static final org.apache.commons.logging.Log LOG
public static final String KEY_PAGE_BLOB_DIRECTORIES
public static final String KEY_ATOMIC_RENAME_DIRECTORIES
public static final int DEFAULT_DOWNLOAD_BLOCK_SIZE
public static final int DEFAULT_UPLOAD_BLOCK_SIZE
public BandwidthGaugeUpdater getBandwidthGaugeUpdater()
public void initialize(URI uri, org.apache.hadoop.conf.Configuration conf, AzureFileSystemInstrumentation instrumentation) throws IllegalArgumentException, AzureException, IOException
uri
- - URI for target storage blob.conf
- - reference to configuration object.instrumentation
- - the metrics source that will keep track of operations here.IllegalArgumentException
- if URI or job object is null, or invalid scheme.AzureException
IOException
public static String getAccountKeyFromConfiguration(String accountName, org.apache.hadoop.conf.Configuration conf) throws KeyProviderException
KeyProviderException
public boolean isPageBlobKey(String key)
public boolean isAtomicRenameKey(String key)
public DataOutputStream storefile(String key, org.apache.hadoop.fs.permission.PermissionStatus permissionStatus) throws AzureException
AzureException
public void storeEmptyFolder(String key, org.apache.hadoop.fs.permission.PermissionStatus permissionStatus) throws AzureException
AzureException
public void storeEmptyLinkFile(String key, String tempBlobKey, org.apache.hadoop.fs.permission.PermissionStatus permissionStatus) throws AzureException
AzureException
public String getLinkInFileMetadata(String key) throws AzureException
AzureException
public org.apache.hadoop.fs.azure.FileMetadata retrieveMetadata(String key) throws IOException
IOException
public DataInputStream retrieve(String key) throws AzureException, IOException
AzureException
IOException
public DataInputStream retrieve(String key, long startByteOffset) throws AzureException, IOException
AzureException
IOException
public org.apache.hadoop.fs.azure.PartialListing list(String prefix, int maxListingCount, int maxListingDepth) throws IOException
IOException
public org.apache.hadoop.fs.azure.PartialListing list(String prefix, int maxListingCount, int maxListingDepth, String priorLastKey) throws IOException
IOException
public org.apache.hadoop.fs.azure.PartialListing listAll(String prefix, int maxListingCount, int maxListingDepth, String priorLastKey) throws IOException
IOException
public void delete(String key, SelfRenewingLease lease) throws IOException
IOException
public void delete(String key) throws IOException
IOException
public void rename(String srcKey, String dstKey) throws IOException
IOException
public void rename(String srcKey, String dstKey, boolean acquireLease, SelfRenewingLease existingLease) throws IOException
IOException
public void changePermissionStatus(String key, org.apache.hadoop.fs.permission.PermissionStatus newPermission) throws AzureException
AzureException
public void purge(String prefix) throws IOException
IOException
public SelfRenewingLease acquireLease(String key) throws AzureException
AzureException
public void updateFolderLastModifiedTime(String key, Date lastModified, SelfRenewingLease folderLease) throws AzureException
AzureException
public void updateFolderLastModifiedTime(String key, SelfRenewingLease folderLease) throws AzureException
AzureException
public void dump() throws IOException
IOException
public void close()
Copyright © 2019 Apache Software Foundation. All Rights Reserved.