Interface SupportsCredentials


public interface SupportsCredentials
Interface to get credentials.
  • Method Details

    • getCredentials

      Credential[] getCredentials()
      Retrieves an array of Credential objects.
      Returns:
      An array of Credential objects. In most cases the array only contains one credential. If the object like Fileset contains multiple locations for different storages like HDFS, S3, the array will contain multiple credentials. The array could be empty if you request a credential for a catalog but the credential provider couldn't generate the credential for the catalog, like S3 token credential provider only generate credential for the specific object like Fileset, Table. There will be at most one credential for one credential type.
    • getCredential

      default Credential getCredential(String credentialType) throws NoSuchCredentialException
      Retrieves an Credential object based on the specified credential type.
      Parameters:
      credentialType - The type of the credential like s3-token, s3-secret-key which defined in the specific credentials.
      Returns:
      An Credential object with the specified credential type.
      Throws:
      NoSuchCredentialException - If the specific credential cannot be found.