public class FilesetCatalog extends CatalogDTO implements FilesetCatalog
Catalog.Type| Modifier and Type | Field and Description |
|---|---|
protected RESTClient |
restClient
The REST client to send the requests.
|
PROPERTY_PACKAGE| Modifier and Type | Method and Description |
|---|---|
Fileset |
alterFileset(NameIdentifier ident,
FilesetChange... changes)
Update a fileset metadata in the catalog.
|
Schema |
alterSchema(NameIdentifier ident,
SchemaChange... changes)
Alter the schema with specified identifier by applying the changes.
|
FilesetCatalog |
asFilesetCatalog() |
SupportsSchemas |
asSchemas()
Return the
SupportsSchemas if the catalog supports schema operations. |
static com.datastrato.gravitino.client.FilesetCatalog.Builder |
builder()
Create a new builder for the fileset 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.
|
Schema |
createSchema(NameIdentifier ident,
java.lang.String comment,
java.util.Map<java.lang.String,java.lang.String> properties)
Create a new schema with specified identifier, comment and metadata.
|
boolean |
dropFileset(NameIdentifier ident)
Drop a fileset from the catalog.
|
boolean |
dropSchema(NameIdentifier ident,
boolean cascade)
Drop the schema with specified identifier.
|
NameIdentifier[] |
listFilesets(Namespace namespace)
List the filesets in a schema namespace from the catalog.
|
NameIdentifier[] |
listSchemas(Namespace namespace)
List all the schemas under the given catalog namespace.
|
Fileset |
loadFileset(NameIdentifier ident)
Load fileset metadata by
NameIdentifier from the catalog. |
Schema |
loadSchema(NameIdentifier ident)
Load the schema with specified identifier.
|
auditInfo, comment, name, properties, provider, typeclone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitfilesetExistsschemaExistsasTableCatalog, asTopicCatalogprotected final RESTClient restClient
public FilesetCatalog asFilesetCatalog() throws java.lang.UnsupportedOperationException
asFilesetCatalog in interface CatalogFilesetCatalog if the catalog supports fileset operations.java.lang.UnsupportedOperationException - if the catalog does not support fileset operations.public NameIdentifier[] listFilesets(Namespace namespace) throws NoSuchSchemaException
listFilesets in interface FilesetCatalognamespace - A schema namespace.NoSuchSchemaException - If the schema does not exist.public Fileset loadFileset(NameIdentifier ident) throws NoSuchFilesetException
NameIdentifier from the catalog.loadFileset in interface FilesetCatalogident - A fileset identifier.NoSuchFilesetException - If the fileset does not exist.public 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.
createFileset in interface FilesetCatalogident - 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.public Fileset alterFileset(NameIdentifier ident, FilesetChange... changes) throws NoSuchFilesetException, java.lang.IllegalArgumentException
alterFileset in interface FilesetCatalogident - A fileset identifier.changes - The changes to apply to the fileset.NoSuchFilesetException - If the fileset does not exist.java.lang.IllegalArgumentException - If the changes are invalid.public boolean dropFileset(NameIdentifier ident)
The underlying files will be deleted if this fileset type is managed, otherwise, only the metadata will be dropped.
dropFileset in interface FilesetCatalogident - A fileset identifier.public static com.datastrato.gravitino.client.FilesetCatalog.Builder builder()
public SupportsSchemas asSchemas() throws java.lang.UnsupportedOperationException
CatalogSupportsSchemas if the catalog supports schema operations.asSchemas in interface CatalogSupportsSchemas if the catalog supports schema operations.java.lang.UnsupportedOperationException - if the catalog does not support schema operations.public NameIdentifier[] listSchemas(Namespace namespace) throws NoSuchCatalogException
listSchemas in interface SupportsSchemasnamespace - The namespace of the catalog.NameIdentifier of the schemas under the given catalog namespace.NoSuchCatalogException - if the catalog with specified namespace does not exist.public Schema createSchema(NameIdentifier ident, java.lang.String comment, java.util.Map<java.lang.String,java.lang.String> properties) throws NoSuchCatalogException, SchemaAlreadyExistsException
createSchema in interface SupportsSchemasident - The name identifier of the schema.comment - The comment of the schema.properties - The properties of the schema.Schema.NoSuchCatalogException - if the catalog with specified namespace does not exist.SchemaAlreadyExistsException - if the schema with specified identifier already exists.public Schema loadSchema(NameIdentifier ident) throws NoSuchSchemaException
loadSchema in interface SupportsSchemasident - The name identifier of the schema.Schema with specified identifier.NoSuchSchemaException - if the schema with specified identifier does not exist.public Schema alterSchema(NameIdentifier ident, SchemaChange... changes) throws NoSuchSchemaException
alterSchema in interface SupportsSchemasident - The name identifier of the schema.changes - The metadata changes to apply.Schema.NoSuchSchemaException - if the schema with specified identifier does not exist.public boolean dropSchema(NameIdentifier ident, boolean cascade) throws NonEmptySchemaException
dropSchema in interface SupportsSchemasident - The name identifier of the schema.cascade - Whether to drop all the tables under the schema.NonEmptySchemaException - if the schema is not empty and cascade is false.