@Evolving public interface FilesetCatalog
Modifier and Type | Method and Description |
---|---|
Fileset |
alterFileset(NameIdentifier ident,
FilesetChange... changes)
Apply the
change to a fileset in the catalog. |
Fileset |
createFileset(NameIdentifier ident,
java.lang.String comment,
Fileset.Type type,
java.lang.String storageLocation,
java.util.Map<java.lang.String,java.lang.String> properties)
Create a fileset metadata in the catalog.
|
boolean |
dropFileset(NameIdentifier ident)
Drop a fileset from the catalog.
|
default boolean |
filesetExists(NameIdentifier ident)
Check if a fileset exists using an
NameIdentifier from the catalog. |
NameIdentifier[] |
listFilesets(Namespace namespace)
List the filesets in a schema namespace from the catalog.
|
Fileset |
loadFileset(NameIdentifier ident)
Load fileset metadata by
NameIdentifier from the catalog. |
NameIdentifier[] listFilesets(Namespace namespace) throws NoSuchSchemaException
namespace
- A schema namespace.NoSuchSchemaException
- If the schema does not exist.Fileset loadFileset(NameIdentifier ident) throws NoSuchFilesetException
NameIdentifier
from the catalog.ident
- A fileset identifier.NoSuchFilesetException
- If the fileset does not exist.default boolean filesetExists(NameIdentifier ident)
NameIdentifier
from the catalog.ident
- A fileset identifier.Fileset createFileset(NameIdentifier ident, java.lang.String comment, Fileset.Type type, java.lang.String storageLocation, java.util.Map<java.lang.String,java.lang.String> properties) throws NoSuchSchemaException, FilesetAlreadyExistsException
If the type of the fileset object is "MANAGED", the underlying storageLocation can be null, and Gravitino will manage the storage location based on the location of the schema.
If the type of the fileset object is "EXTERNAL", the underlying storageLocation must be set.
ident
- A fileset identifier.comment
- The comment of the fileset.type
- The type of the fileset.storageLocation
- The storage location of the fileset.properties
- The properties of the fileset.NoSuchSchemaException
- If the schema does not exist.FilesetAlreadyExistsException
- If the fileset already exists.Fileset alterFileset(NameIdentifier ident, FilesetChange... changes) throws NoSuchFilesetException, java.lang.IllegalArgumentException
change
to a fileset in the catalog.
Implementation may reject the change. If any change is rejected, no changes should be applied to the fileset.
The FilesetChange.RenameFileset
change will only update the fileset name, the underlying storage
location for managed fileset will not be renamed.
ident
- A fileset identifier.changes
- The changes to apply to the fileset.NoSuchFilesetException
- If the fileset does not exist.java.lang.IllegalArgumentException
- If the change is rejected by the implementation.boolean dropFileset(NameIdentifier ident)
The underlying files will be deleted if this fileset type is managed, otherwise, only the metadata will be dropped.
ident
- A fileset identifier.