@Evolving public interface SupportsCatalogs
Modifier and Type | Method and Description |
---|---|
Catalog |
alterCatalog(java.lang.String catalogName,
CatalogChange... changes)
Alter a catalog with specified identifier.
|
default boolean |
catalogExists(java.lang.String catalogName)
Check if a catalog exists.
|
Catalog |
createCatalog(java.lang.String catalogName,
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(java.lang.String catalogName)
Drop a catalog with specified identifier.
|
java.lang.String[] |
listCatalogs()
List the name of all catalogs in the metalake.
|
Catalog[] |
listCatalogsInfo()
List all catalogs with their information in the metalake.
|
Catalog |
loadCatalog(java.lang.String catalogName)
Load a catalog by its identifier.
|
void |
testConnection(java.lang.String catalogName,
Catalog.Type type,
java.lang.String provider,
java.lang.String comment,
java.util.Map<java.lang.String,java.lang.String> properties)
Test whether the catalog with specified parameters can be connected to before creating it.
|
java.lang.String[] listCatalogs() throws NoSuchMetalakeException
NoSuchMetalakeException
- If the metalake does not exist.Catalog[] listCatalogsInfo() throws NoSuchMetalakeException
NoSuchMetalakeException
- If the metalake with namespace does not exist.Catalog loadCatalog(java.lang.String catalogName) throws NoSuchCatalogException
catalogName
- the identifier of the catalog.NoSuchCatalogException
- If the catalog does not exist.default boolean catalogExists(java.lang.String catalogName)
catalogName
- The identifier of the catalog.Catalog createCatalog(java.lang.String catalogName, 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.
catalogName
- the name of the catalog.type
- the type of the catalog.provider
- the provider of the catalog.comment
- the comment of the catalog.properties
- the properties of the catalog.NoSuchMetalakeException
- If the metalake does not exist.CatalogAlreadyExistsException
- If the catalog already exists.Catalog alterCatalog(java.lang.String catalogName, CatalogChange... changes) throws NoSuchCatalogException, java.lang.IllegalArgumentException
catalogName
- 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(java.lang.String catalogName)
catalogName
- the name of the catalog.void testConnection(java.lang.String catalogName, Catalog.Type type, java.lang.String provider, java.lang.String comment, java.util.Map<java.lang.String,java.lang.String> properties) throws java.lang.Exception
catalogName
- the name of the catalog.type
- the type of the catalog.provider
- the provider of the catalog.comment
- the comment of the catalog.properties
- the properties of the catalog.java.lang.Exception
- if the test failed.