public class GravitinoClient extends java.lang.Object implements SupportsMetalakes, java.io.Closeable
It uses an underlying RESTClient to send HTTP requests and receive responses from the
API.
| Modifier and Type | Class and Description |
|---|---|
static class |
GravitinoClient.Builder
Builder class for constructing a GravitinoClient.
|
| Modifier and Type | Method and Description |
|---|---|
GravitinoMetaLake |
alterMetalake(NameIdentifier ident,
MetalakeChange... changes)
Alters a specific Metalake using the Gravitino API.
|
static GravitinoClient.Builder |
builder(java.lang.String uri)
Creates a new builder for constructing a GravitinoClient.
|
void |
close()
Closes the GravitinoClient and releases any underlying resources.
|
GravitinoMetaLake |
createMetalake(NameIdentifier ident,
java.lang.String comment,
java.util.Map<java.lang.String,java.lang.String> properties)
Creates a new Metalake using the Gravitino API.
|
boolean |
dropMetalake(NameIdentifier ident)
Drops a specific Metalake using the Gravitino API.
|
GravitinoVersion |
getVersion() |
GravitinoMetaLake[] |
listMetalakes()
Retrieves a list of Metalakes from the Gravitino API.
|
GravitinoMetaLake |
loadMetalake(NameIdentifier ident)
Loads a specific Metalake from the Gravitino API.
|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitmetalakeExistspublic GravitinoMetaLake[] listMetalakes()
listMetalakes in interface SupportsMetalakespublic GravitinoMetaLake loadMetalake(NameIdentifier ident) throws NoSuchMetalakeException
loadMetalake in interface SupportsMetalakesident - The identifier of the Metalake to be loaded.NoSuchMetalakeException - If the specified Metalake does not exist.public GravitinoMetaLake createMetalake(NameIdentifier ident, java.lang.String comment, java.util.Map<java.lang.String,java.lang.String> properties) throws MetalakeAlreadyExistsException
createMetalake in interface SupportsMetalakesident - The identifier of the new Metalake.comment - The comment for the new Metalake.properties - The properties of the new Metalake.MetalakeAlreadyExistsException - If a Metalake with the specified identifier already
exists.public GravitinoMetaLake alterMetalake(NameIdentifier ident, MetalakeChange... changes) throws NoSuchMetalakeException, java.lang.IllegalArgumentException
alterMetalake in interface SupportsMetalakesident - The identifier of the Metalake to be altered.changes - The changes to be applied to the Metalake.NoSuchMetalakeException - If the specified Metalake does not exist.java.lang.IllegalArgumentException - If the provided changes are invalid or not applicable.public boolean dropMetalake(NameIdentifier ident)
dropMetalake in interface SupportsMetalakesident - The identifier of the Metalake to be dropped.public GravitinoVersion getVersion()
public void close()
close in interface java.io.Closeableclose in interface java.lang.AutoCloseablepublic static GravitinoClient.Builder builder(java.lang.String uri)
uri - The base URI for the Gravitino API.