Package org.apache.gravitino.credential
Class ADLSTokenCredential
java.lang.Object
org.apache.gravitino.credential.ADLSTokenCredential
- All Implemented Interfaces:
Credential
ADLS SAS token credential.
-
Field Summary
FieldsModifier and TypeFieldDescriptionstatic final StringADLS base domainstatic final StringADLS token credential type.static final StringADLS SAS token used to access ADLS data.static final StringADLS storage account nameFields inherited from interface org.apache.gravitino.credential.Credential
CREDENTIAL_TYPE, EXPIRE_TIME_IN_MS -
Constructor Summary
ConstructorsConstructorDescriptionThis is the constructor that is used by credential factory to create an instance of credential according to the credential information.ADLSTokenCredential(String accountName, String sasToken, long expireTimeInMS) Constructs an instance ofADLSTokenCredentialwith SAS token. -
Method Summary
Modifier and TypeMethodDescriptionGet ADLS account nameReturns credential information.Returns the type of the credential.longReturns the expiration time of the credential in milliseconds since the epoch, 0 means not expire.voidinitialize(Map<String, String> credentialInfo, long expireTimeInMS) Initialize the credential with the credential information.sasToken()Get ADLS SAS token.Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitMethods inherited from interface org.apache.gravitino.credential.Credential
toProperties
-
Field Details
-
ADLS_TOKEN_CREDENTIAL_TYPE
ADLS token credential type.- See Also:
-
ADLS_DOMAIN
ADLS base domain- See Also:
-
GRAVITINO_AZURE_STORAGE_ACCOUNT_NAME
ADLS storage account name- See Also:
-
GRAVITINO_ADLS_SAS_TOKEN
ADLS SAS token used to access ADLS data.- See Also:
-
-
Constructor Details
-
ADLSTokenCredential
Constructs an instance ofADLSTokenCredentialwith SAS token.- Parameters:
accountName- The ADLS account name.sasToken- The ADLS SAS token.expireTimeInMS- The SAS token expire time in ms.
-
ADLSTokenCredential
public ADLSTokenCredential()This is the constructor that is used by credential factory to create an instance of credential according to the credential information.
-
-
Method Details
-
credentialType
Description copied from interface:CredentialReturns the type of the credential. It should be the same as the credential type of the credential provider.- Specified by:
credentialTypein interfaceCredential- Returns:
- the credential type as a String.
-
expireTimeInMs
public long expireTimeInMs()Description copied from interface:CredentialReturns the expiration time of the credential in milliseconds since the epoch, 0 means not expire.- Specified by:
expireTimeInMsin interfaceCredential- Returns:
- the expiration time as a long.
-
credentialInfo
Description copied from interface:CredentialReturns credential information.- Specified by:
credentialInfoin interfaceCredential- Returns:
- a map of credential information.
-
initialize
Description copied from interface:CredentialInitialize the credential with the credential information.This method is invoked to deserialize the credential in client side.
- Specified by:
initializein interfaceCredential- Parameters:
credentialInfo- The credential information fromCredential.credentialInfo().expireTimeInMS- The expire-time fromCredential.expireTimeInMs().
-
accountName
Get ADLS account name- Returns:
- The ADLS account name
-
sasToken
Get ADLS SAS token.- Returns:
- The ADLS SAS token.
-