public class SecureStorageInterfaceImpl extends Object
| Modifier and Type | Class and Description |
|---|---|
static class |
StorageInterface.CloudBlobContainerWrapper
A thin wrapper over the
CloudBlobContainer class
that simply redirects calls to the real object except in unit tests. |
static class |
StorageInterface.CloudBlobDirectoryWrapper
A thin wrapper over the
CloudBlobDirectory class
that simply redirects calls to the real object except in unit tests. |
static interface |
StorageInterface.CloudBlobWrapper
A thin wrapper over the
CloudBlob class that simply redirects calls
to the real object except in unit tests. |
static interface |
StorageInterface.CloudBlockBlobWrapper
A thin wrapper over the
CloudBlockBlob class
that simply redirects calls to the real object except in unit tests. |
static interface |
StorageInterface.CloudPageBlobWrapper
A thin wrapper over the
CloudPageBlob
class that simply redirects calls to the real object except in unit tests. |
| Modifier and Type | Field and Description |
|---|---|
static String |
KEY_USE_CONTAINER_SASKEY_FOR_ALL_ACCESS
Configuration key to specify if containerSasKey should be used for all accesses
|
static org.slf4j.Logger |
LOG |
static String |
SAS_ERROR_CODE |
| Constructor and Description |
|---|
SecureStorageInterfaceImpl(boolean useLocalSASKeyMode,
org.apache.hadoop.conf.Configuration conf) |
| Modifier and Type | Method and Description |
|---|---|
void |
createBlobClient(com.microsoft.azure.storage.CloudStorageAccount account)
Creates a new Blob service client.
|
void |
createBlobClient(URI baseUri)
Creates an instance of the
CloudBlobClient class using the
specified Blob service endpoint. |
void |
createBlobClient(URI baseUri,
com.microsoft.azure.storage.StorageCredentials credentials)
Creates an instance of the
CloudBlobClient class using the
specified Blob service endpoint and account credentials. |
StorageInterface.CloudBlobContainerWrapper |
getContainerReference(String name)
Returns a reference to a
StorageInterface.CloudBlobContainerWrapper object that
represents the cloud blob container for the specified address. |
com.microsoft.azure.storage.StorageCredentials |
getCredentials()
Returns the credentials for the Blob service, as configured for the storage
account.
|
void |
setRetryPolicyFactory(com.microsoft.azure.storage.RetryPolicyFactory retryPolicyFactory)
Sets the RetryPolicyFactory object to use when making service requests.
|
void |
setStorageAccountName(String storageAccount) |
void |
setTimeoutInMs(int timeoutInMs)
Sets the timeout to use when making requests to the storage service.
|
public static final org.slf4j.Logger LOG
public static final String SAS_ERROR_CODE
public static final String KEY_USE_CONTAINER_SASKEY_FOR_ALL_ACCESS
public SecureStorageInterfaceImpl(boolean useLocalSASKeyMode,
org.apache.hadoop.conf.Configuration conf)
throws SecureModeException
SecureModeExceptionpublic void setTimeoutInMs(int timeoutInMs)
The server timeout interval begins at the time that the complete request
has been received by the service, and the server begins processing the
response. If the timeout interval elapses before the response is returned
to the client, the operation times out. The timeout interval resets with
each retry, if the request is retried.
The default timeout interval for a request made via the service client is
90 seconds. You can change this value on the service client by setting this
property, so that all subsequent requests made via the service client will
use the new timeout interval. You can also change this value for an
individual request, by setting the
RequestOptions.timeoutIntervalInMs
property.
If you are downloading a large blob, you should increase the value of the
timeout beyond the default value.
timeoutInMs - The timeout, in milliseconds, to use when making requests to the
storage service.public void setRetryPolicyFactory(com.microsoft.azure.storage.RetryPolicyFactory retryPolicyFactory)
retryPolicyFactory - the RetryPolicyFactory object to use when making service requests.public void createBlobClient(com.microsoft.azure.storage.CloudStorageAccount account)
account - cloud storage account.public void createBlobClient(URI baseUri)
CloudBlobClient class using the
specified Blob service endpoint.baseUri - A java.net.URI object that represents the Blob
service endpoint used to create the client.public void createBlobClient(URI baseUri, com.microsoft.azure.storage.StorageCredentials credentials)
CloudBlobClient class using the
specified Blob service endpoint and account credentials.baseUri - A java.net.URI object that represents the Blob
service endpoint used to create the client.credentials - A StorageCredentials object that represents the account
credentials.public com.microsoft.azure.storage.StorageCredentials getCredentials()
StorageCredentials object that represents the credentials
for this storage account.public StorageInterface.CloudBlobContainerWrapper getContainerReference(String name) throws URISyntaxException, com.microsoft.azure.storage.StorageException
StorageInterface.CloudBlobContainerWrapper object that
represents the cloud blob container for the specified address.name - A String that represents the name of the container.StorageInterface.CloudBlobContainerWrapper object that represents a
reference to the cloud blob container.URISyntaxException - If the resource URI is invalid.com.microsoft.azure.storage.StorageException - If a storage service error occurred.public void setStorageAccountName(String storageAccount)
Copyright © 2008–2020 Apache Software Foundation. All rights reserved.