gravitino.client.generic_fileset.GenericFileset¶
- class gravitino.client.generic_fileset.GenericFileset(fileset: FilesetDTO, rest_client: HTTPClient, full_namespace: Namespace)¶
Bases:
Fileset
,SupportsCredentials
- __init__(fileset: FilesetDTO, rest_client: HTTPClient, full_namespace: Namespace)¶
Methods
__init__
(fileset, rest_client, full_namespace)audit_info
()comment
()Returns:
get_credential
(credential_type)Retrieves Credential object based on the specified credential type.
Retrieves a List of Credential objects.
name
()Returns:
Returns:
Get the storage location of the file or directory path that is managed by this fileset object.
support_credentials
()type
()@Returns:
- class Type(value)¶
Bases:
Enum
An enum representing the type of the fileset object.
- EXTERNAL = 'external'¶
Fileset is not managed by Gravitino. When specified, the data will not be deleted when the fileset object is deleted
- MANAGED = 'managed'¶
Fileset is managed by Gravitino. When specified, the data will be deleted when the fileset object is deleted
- comment() str | None ¶
- Returns:
The comment of the fileset object. Null is returned if no comment is set.
- get_credential(credential_type: str) Credential ¶
Retrieves Credential object based on the specified credential type.
- Args:
credential_type: The type of the credential like s3-token, s3-secret-key which are defined in the specific credentials.
- Returns:
An Credential object with the specified credential type.
- Raises:
NoSuchCredentialException If the specific credential cannot be found. IllegalStateException if multiple credential can be found.
- get_credentials() List[Credential] ¶
Retrieves a List of Credential objects.
- Returns:
A List 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.
- name() str ¶
- Returns:
Name of the fileset object.
- properties() Dict[str, str] ¶
- Returns:
The properties of the fileset object. Empty map is returned if no properties are set.
- storage_location() str ¶
Get the storage location of the file or directory path that is managed by this fileset object.
The returned storageLocation can either be the one specified when creating the fileset object, or the one specified in the catalog / schema level if the fileset object is created under this catalog / schema.
For managed fileset, the storageLocation can be:
The one specified when creating the fileset object.
2) When catalog property “location” is specified but schema property “location” is not specified, then the storageLocation will be “{catalog location}/schemaName/filesetName”.
3) When catalog property “location” is not specified but schema property “location” is specified, then the storageLocation will be “{schema location}/filesetName”.
4) When both catalog property “location” and schema property “location” are specified, then the storageLocation will be “{schema location}/filesetName”.
5) When both catalog property “location” and schema property “location” are not specified, and storageLocation specified when creating the fileset object is null, this situation is illegal.
For external fileset, the storageLocation can be:
The one specified when creating the fileset object.
- Returns:
The storage location of the fileset object.