public class FixedSASTokenProvider extends Object implements SASTokenProvider
SASTokenProvider to use a fixed SAS token with ABFS.
Use this to avoid implementing a Custom Token Provider just to return fixed SAS.
Fixed SAS Token to be provided using the config "fs.azure.sas.fixed.token".CHECK_ACCESS_OPERATION, CREATE_DIRECTORY_OPERATION, CREATE_FILE_OPERATION, DELETE_OPERATION, DELETE_RECURSIVE_OPERATION, GET_ACL_OPERATION, GET_PROPERTIES_OPERATION, GET_STATUS_OPERATION, LIST_OPERATION, READ_OPERATION, RENAME_DESTINATION_OPERATION, RENAME_SOURCE_OPERATION, SET_ACL_OPERATION, SET_OWNER_OPERATION, SET_PERMISSION_OPERATION, SET_PROPERTIES_OPERATION, WRITE_OPERATION| Constructor and Description |
|---|
FixedSASTokenProvider(String fixedSASToken) |
| Modifier and Type | Method and Description |
|---|---|
String |
getSASToken(String account,
String fileSystem,
String path,
String operation)
Returns the fixed SAS Token configured.
|
void |
initialize(org.apache.hadoop.conf.Configuration configuration,
String accountName)
Initialize authorizer for Azure Blob File System.
|
public FixedSASTokenProvider(String fixedSASToken) throws SASTokenProviderException
SASTokenProviderExceptionpublic void initialize(org.apache.hadoop.conf.Configuration configuration,
String accountName)
throws IOException
SASTokenProviderinitialize in interface SASTokenProviderconfiguration - Configuration objectaccountName - Account NameIOException - network problems or similar.public String getSASToken(String account, String fileSystem, String path, String operation) throws IOException
getSASToken in interface SASTokenProvideraccount - the name of the storage account.fileSystem - the name of the fileSystem.path - the file or directory path.operation - the operation to be performed on the path.IOException - neverCopyright © 2008–2024 Apache Software Foundation. All rights reserved.