public class GravitinoClient extends GravitinoClientBase implements SupportsCatalogs
It uses an underlying RESTClient to send HTTP requests and receive responses from the
API.
| Modifier and Type | Class and Description |
|---|---|
static class |
GravitinoClient.ClientBuilder
Builder class for constructing a GravitinoClient.
|
GravitinoClientBase.Builder<T>API_METALAKES_IDENTIFIER_PATH, API_METALAKES_LIST_PATH, restClient| Modifier and Type | Method and Description |
|---|---|
Catalog |
alterCatalog(NameIdentifier ident,
CatalogChange... changes)
Alter a catalog with specified identifier.
|
static GravitinoClient.ClientBuilder |
builder(java.lang.String uri)
Creates a new builder for constructing a GravitinoClient.
|
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.
|
checkVersion, clientVersion, close, getVersion, loadMetalake, serverVersionclone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitcatalogExistspublic NameIdentifier[] listCatalogs(Namespace namespace) throws NoSuchMetalakeException
SupportsCatalogsNamespace.listCatalogs in interface SupportsCatalogsnamespace - The namespace to list the catalogs under it.NoSuchMetalakeException - If the metalake with namespace does not exist.public Catalog[] listCatalogsInfo(Namespace namespace) throws NoSuchMetalakeException
SupportsCatalogsNamespace.listCatalogsInfo in interface SupportsCatalogsnamespace - The namespace to list the catalogs under it.NoSuchMetalakeException - If the metalake with namespace does not exist.public Catalog loadCatalog(NameIdentifier ident) throws NoSuchCatalogException
SupportsCatalogsloadCatalog in interface SupportsCatalogsident - the identifier of the catalog.NoSuchCatalogException - If the catalog does not exist.public 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
SupportsCatalogsThe 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.
createCatalog in interface SupportsCatalogsident - the identifier 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.public Catalog alterCatalog(NameIdentifier ident, CatalogChange... changes) throws NoSuchCatalogException, java.lang.IllegalArgumentException
SupportsCatalogsalterCatalog in interface SupportsCatalogsident - 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.public boolean dropCatalog(NameIdentifier ident)
SupportsCatalogsdropCatalog in interface SupportsCatalogsident - the identifier of the catalog.public static GravitinoClient.ClientBuilder builder(java.lang.String uri)
uri - The base URI for the Gravitino API.