public class NessieCatalog
extends org.apache.iceberg.BaseMetastoreCatalog
implements java.lang.AutoCloseable, org.apache.iceberg.catalog.SupportsNamespaces, org.apache.hadoop.conf.Configurable
A note on namespaces: Nessie namespaces are implicit and do not need to be explicitly created or deleted. The create and delete namespace methods are no-ops for the NessieCatalog. One can still list namespaces that have objects stored in them to assist with namespace-centric catalog exploration.
| Constructor and Description |
|---|
NessieCatalog() |
| Modifier and Type | Method and Description |
|---|---|
void |
close() |
void |
createNamespace(org.apache.iceberg.catalog.Namespace namespace,
java.util.Map<java.lang.String,java.lang.String> metadata) |
protected java.lang.String |
defaultWarehouseLocation(org.apache.iceberg.catalog.TableIdentifier table) |
boolean |
dropNamespace(org.apache.iceberg.catalog.Namespace namespace) |
boolean |
dropTable(org.apache.iceberg.catalog.TableIdentifier identifier,
boolean purge) |
org.apache.hadoop.conf.Configuration |
getConf() |
void |
initialize(java.lang.String name,
java.util.Map<java.lang.String,java.lang.String> options) |
void |
initialize(java.lang.String name,
NessieIcebergClient client,
org.apache.iceberg.io.FileIO fileIO,
java.util.Map<java.lang.String,java.lang.String> catalogOptions)
An alternative way to initialize the catalog using a pre-configured
NessieIcebergClient
and FileIO instance. |
java.util.List<org.apache.iceberg.catalog.Namespace> |
listNamespaces(org.apache.iceberg.catalog.Namespace namespace) |
java.util.List<org.apache.iceberg.catalog.TableIdentifier> |
listTables(org.apache.iceberg.catalog.Namespace namespace) |
java.util.Map<java.lang.String,java.lang.String> |
loadNamespaceMetadata(org.apache.iceberg.catalog.Namespace namespace)
Load the given namespace but return an empty map because namespace properties are currently not
supported.
|
java.lang.String |
name() |
protected org.apache.iceberg.TableOperations |
newTableOps(org.apache.iceberg.catalog.TableIdentifier tableIdentifier) |
boolean |
removeProperties(org.apache.iceberg.catalog.Namespace namespace,
java.util.Set<java.lang.String> properties) |
void |
renameTable(org.apache.iceberg.catalog.TableIdentifier from,
org.apache.iceberg.catalog.TableIdentifier to) |
void |
setConf(org.apache.hadoop.conf.Configuration conf) |
boolean |
setProperties(org.apache.iceberg.catalog.Namespace namespace,
java.util.Map<java.lang.String,java.lang.String> properties) |
buildTable, fullTableName, isValidIdentifier, loadTable, properties, registerTable, toStringclone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, waitcreateNamespace, listNamespaces, namespaceExistscreateTable, createTable, createTable, createTable, dropTable, invalidateTable, newCreateTableTransaction, newCreateTableTransaction, newCreateTableTransaction, newCreateTableTransaction, newReplaceTableTransaction, newReplaceTableTransaction, newReplaceTableTransaction, newReplaceTableTransaction, tableExistspublic void initialize(java.lang.String name,
java.util.Map<java.lang.String,java.lang.String> options)
initialize in interface org.apache.iceberg.catalog.Catalogpublic void initialize(java.lang.String name,
NessieIcebergClient client,
org.apache.iceberg.io.FileIO fileIO,
java.util.Map<java.lang.String,java.lang.String> catalogOptions)
NessieIcebergClient
and FileIO instance.name - The name of the catalog, defaults to "nessie" if nullclient - The pre-configured NessieIcebergClient instance to usefileIO - The FileIO instance to usecatalogOptions - The catalog options to usepublic void close()
throws java.io.IOException
close in interface java.lang.AutoCloseablejava.io.IOExceptionpublic java.lang.String name()
name in interface org.apache.iceberg.catalog.Catalogprotected org.apache.iceberg.TableOperations newTableOps(org.apache.iceberg.catalog.TableIdentifier tableIdentifier)
newTableOps in class org.apache.iceberg.BaseMetastoreCatalogprotected java.lang.String defaultWarehouseLocation(org.apache.iceberg.catalog.TableIdentifier table)
defaultWarehouseLocation in class org.apache.iceberg.BaseMetastoreCatalogpublic java.util.List<org.apache.iceberg.catalog.TableIdentifier> listTables(org.apache.iceberg.catalog.Namespace namespace)
listTables in interface org.apache.iceberg.catalog.Catalogpublic boolean dropTable(org.apache.iceberg.catalog.TableIdentifier identifier,
boolean purge)
dropTable in interface org.apache.iceberg.catalog.Catalogpublic void renameTable(org.apache.iceberg.catalog.TableIdentifier from,
org.apache.iceberg.catalog.TableIdentifier to)
renameTable in interface org.apache.iceberg.catalog.Catalogpublic void createNamespace(org.apache.iceberg.catalog.Namespace namespace,
java.util.Map<java.lang.String,java.lang.String> metadata)
createNamespace in interface org.apache.iceberg.catalog.SupportsNamespacespublic java.util.List<org.apache.iceberg.catalog.Namespace> listNamespaces(org.apache.iceberg.catalog.Namespace namespace)
throws org.apache.iceberg.exceptions.NoSuchNamespaceException
listNamespaces in interface org.apache.iceberg.catalog.SupportsNamespacesorg.apache.iceberg.exceptions.NoSuchNamespaceExceptionpublic java.util.Map<java.lang.String,java.lang.String> loadNamespaceMetadata(org.apache.iceberg.catalog.Namespace namespace)
throws org.apache.iceberg.exceptions.NoSuchNamespaceException
loadNamespaceMetadata in interface org.apache.iceberg.catalog.SupportsNamespacesnamespace - a namespace. Namespaceorg.apache.iceberg.exceptions.NoSuchNamespaceException - If the namespace does not existpublic boolean dropNamespace(org.apache.iceberg.catalog.Namespace namespace)
throws org.apache.iceberg.exceptions.NamespaceNotEmptyException
dropNamespace in interface org.apache.iceberg.catalog.SupportsNamespacesorg.apache.iceberg.exceptions.NamespaceNotEmptyExceptionpublic boolean setProperties(org.apache.iceberg.catalog.Namespace namespace,
java.util.Map<java.lang.String,java.lang.String> properties)
setProperties in interface org.apache.iceberg.catalog.SupportsNamespacespublic boolean removeProperties(org.apache.iceberg.catalog.Namespace namespace,
java.util.Set<java.lang.String> properties)
removeProperties in interface org.apache.iceberg.catalog.SupportsNamespacespublic void setConf(org.apache.hadoop.conf.Configuration conf)
setConf in interface org.apache.hadoop.conf.Configurablepublic org.apache.hadoop.conf.Configuration getConf()
getConf in interface org.apache.hadoop.conf.Configurable