Package org.apache.gravitino.credential
Interface SupportsCredentials
public interface SupportsCredentials
Interface to get credentials.
-
Method Summary
Modifier and TypeMethodDescriptiondefault CredentialgetCredential(String credentialType) Retrieves anCredentialobject based on the specified credential type.Retrieves an array ofCredentialobjects.
-
Method Details
-
getCredentials
Credential[] getCredentials()Retrieves an array ofCredentialobjects.- Returns:
- An array of
Credentialobjects. In most cases the array only contains one credential. If the object likeFilesetcontains 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 likeFileset,Table. There will be at most one credential for one credential type.
-
getCredential
Retrieves anCredentialobject 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
Credentialobject with the specified credential type. - Throws:
NoSuchCredentialException- If the specific credential cannot be found.
-