Package org.apache.gravitino.credential
Class AzureAccountKeyCredential
java.lang.Object
org.apache.gravitino.credential.AzureAccountKeyCredential
- All Implemented Interfaces:
Credential
Azure account key credential.
-
Field Summary
FieldsModifier and TypeFieldDescriptionstatic final String
Azure account key credential type.static final String
Azure storage account keystatic final String
Azure 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.AzureAccountKeyCredential
(String accountName, String accountKey) Constructs an instance ofAzureAccountKeyCredential
. -
Method Summary
Modifier and TypeMethodDescriptionGet Azure account keyGet Azure account nameReturns credential information.Returns the type of the credential.long
Returns the expiration time of the credential in milliseconds since the epoch, 0 means not expire.void
initialize
(Map<String, String> credentialInfo, long expireTimeInMS) Initialize the credential with the credential information.Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
Methods inherited from interface org.apache.gravitino.credential.Credential
toProperties
-
Field Details
-
AZURE_ACCOUNT_KEY_CREDENTIAL_TYPE
Azure account key credential type.- See Also:
-
GRAVITINO_AZURE_STORAGE_ACCOUNT_NAME
Azure storage account name- See Also:
-
GRAVITINO_AZURE_STORAGE_ACCOUNT_KEY
Azure storage account key- See Also:
-
-
Constructor Details
-
AzureAccountKeyCredential
Constructs an instance ofAzureAccountKeyCredential
.- Parameters:
accountName
- The Azure account name.accountKey
- The Azure account key.
-
AzureAccountKeyCredential
public AzureAccountKeyCredential()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:Credential
Returns the type of the credential. It should be the same as the credential type of the credential provider.- Specified by:
credentialType
in interfaceCredential
- Returns:
- the credential type as a String.
-
expireTimeInMs
public long expireTimeInMs()Description copied from interface:Credential
Returns the expiration time of the credential in milliseconds since the epoch, 0 means not expire.- Specified by:
expireTimeInMs
in interfaceCredential
- Returns:
- the expiration time as a long.
-
credentialInfo
Description copied from interface:Credential
Returns credential information.- Specified by:
credentialInfo
in interfaceCredential
- Returns:
- a map of credential information.
-
initialize
Description copied from interface:Credential
Initialize the credential with the credential information.This method is invoked to deserialize the credential in client side.
- Specified by:
initialize
in interfaceCredential
- Parameters:
credentialInfo
- The credential information fromCredential.credentialInfo()
.expireTimeInMS
- The expire-time fromCredential.expireTimeInMs()
.
-
accountName
Get Azure account name- Returns:
- The Azure account name
-
accountKey
Get Azure account key- Returns:
- The Azure account key
-