@Evolving public interface SupportsCatalogs
Modifier and Type | Method and Description |
---|---|
Catalog |
alterCatalog(NameIdentifier ident,
CatalogChange... changes)
Alter a catalog with specified identifier.
|
default boolean |
catalogExists(NameIdentifier ident)
Check if a catalog exists.
|
Catalog |
createCatalog(NameIdentifier ident,
Catalog.Type type,
java.lang.String provider,
java.lang.String comment,
java.util.Map<java.lang.String,java.lang.String> properties)
Create a catalog with specified identifier.
|
boolean |
dropCatalog(NameIdentifier ident)
Drop a catalog with specified identifier.
|
NameIdentifier[] |
listCatalogs(Namespace namespace)
List all catalogs in the metalake under the namespace
Namespace . |
Catalog[] |
listCatalogsInfo(Namespace namespace)
List all catalogs with their information in the metalake under the namespace
Namespace . |
Catalog |
loadCatalog(NameIdentifier ident)
Load a catalog by its identifier.
|
NameIdentifier[] listCatalogs(Namespace namespace) throws NoSuchMetalakeException
Namespace
.namespace
- The namespace to list the catalogs under it.NoSuchMetalakeException
- If the metalake with namespace does not exist.Catalog[] listCatalogsInfo(Namespace namespace) throws NoSuchMetalakeException
Namespace
.namespace
- The namespace to list the catalogs under it.NoSuchMetalakeException
- If the metalake with namespace does not exist.Catalog loadCatalog(NameIdentifier ident) throws NoSuchCatalogException
ident
- the identifier of the catalog.NoSuchCatalogException
- If the catalog does not exist.default boolean catalogExists(NameIdentifier ident)
ident
- The identifier of the catalog.Catalog createCatalog(NameIdentifier ident, Catalog.Type type, java.lang.String provider, java.lang.String comment, java.util.Map<java.lang.String,java.lang.String> properties) throws NoSuchMetalakeException, CatalogAlreadyExistsException
The parameter "provider" is a short name of the catalog, used to tell Gravitino which
catalog should be created. The short name should be the same as the CatalogProvider
interface provided.
ident
- the identifier of the catalog.type
- the type of the catalog.comment
- the comment of the catalog.provider
- the provider of the catalog.properties
- the properties of the catalog.NoSuchMetalakeException
- If the metalake does not exist.CatalogAlreadyExistsException
- If the catalog already exists.Catalog alterCatalog(NameIdentifier ident, CatalogChange... changes) throws NoSuchCatalogException, java.lang.IllegalArgumentException
ident
- the identifier of the catalog.changes
- the changes to apply to the catalog.NoSuchCatalogException
- If the catalog does not exist.java.lang.IllegalArgumentException
- If the changes cannot be applied to the catalog.boolean dropCatalog(NameIdentifier ident)
ident
- the identifier of the catalog.