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