Class ADLSTokenCredential

java.lang.Object
org.apache.gravitino.credential.ADLSTokenCredential
All Implemented Interfaces:
Credential

public class ADLSTokenCredential extends Object implements Credential
ADLS SAS token credential.
  • Field Details

    • ADLS_TOKEN_CREDENTIAL_TYPE

      public static final String ADLS_TOKEN_CREDENTIAL_TYPE
      ADLS token credential type.
      See Also:
    • ADLS_DOMAIN

      public static final String ADLS_DOMAIN
      ADLS base domain
      See Also:
    • GRAVITINO_AZURE_STORAGE_ACCOUNT_NAME

      public static final String GRAVITINO_AZURE_STORAGE_ACCOUNT_NAME
      ADLS storage account name
      See Also:
    • GRAVITINO_ADLS_SAS_TOKEN

      public static final String GRAVITINO_ADLS_SAS_TOKEN
      ADLS SAS token used to access ADLS data.
      See Also:
  • Constructor Details

    • ADLSTokenCredential

      public ADLSTokenCredential(String accountName, String sasToken, long expireTimeInMS)
      Constructs an instance of ADLSTokenCredential with 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

      public String 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 interface Credential
      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 interface Credential
      Returns:
      the expiration time as a long.
    • credentialInfo

      public Map<String,String> credentialInfo()
      Description copied from interface: Credential
      Returns credential information.
      Specified by:
      credentialInfo in interface Credential
      Returns:
      a map of credential information.
    • initialize

      public void initialize(Map<String,String> credentialInfo, long expireTimeInMS)
      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 interface Credential
      Parameters:
      credentialInfo - The credential information from Credential.credentialInfo().
      expireTimeInMS - The expire-time from Credential.expireTimeInMs().
    • accountName

      public String accountName()
      Get ADLS account name
      Returns:
      The ADLS account name
    • sasToken

      public String sasToken()
      Get ADLS SAS token.
      Returns:
      The ADLS SAS token.