Package org.apache.iceberg.nessie
Class NessieCatalog
- java.lang.Object
-
- org.apache.iceberg.BaseMetastoreCatalog
-
- org.apache.iceberg.view.BaseMetastoreViewCatalog
-
- org.apache.iceberg.nessie.NessieCatalog
-
- All Implemented Interfaces:
java.io.Closeable,java.lang.AutoCloseable,org.apache.iceberg.catalog.Catalog,org.apache.iceberg.catalog.SupportsNamespaces,org.apache.iceberg.catalog.ViewCatalog,org.apache.iceberg.hadoop.Configurable<java.lang.Object>
public class NessieCatalog extends org.apache.iceberg.view.BaseMetastoreViewCatalog implements org.apache.iceberg.catalog.SupportsNamespaces, org.apache.iceberg.hadoop.Configurable<java.lang.Object>Nessie implementation of Iceberg Catalog.
-
-
Nested Class Summary
-
Nested classes/interfaces inherited from class org.apache.iceberg.view.BaseMetastoreViewCatalog
org.apache.iceberg.view.BaseMetastoreViewCatalog.BaseMetastoreViewCatalogTableBuilder, org.apache.iceberg.view.BaseMetastoreViewCatalog.BaseViewBuilder
-
-
Constructor Summary
Constructors Constructor Description NessieCatalog()
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description voidclose()voidcreateNamespace(org.apache.iceberg.catalog.Namespace namespace, java.util.Map<java.lang.String,java.lang.String> metadata)protected java.lang.StringdefaultWarehouseLocation(org.apache.iceberg.catalog.TableIdentifier table)booleandropNamespace(org.apache.iceberg.catalog.Namespace namespace)booleandropTable(org.apache.iceberg.catalog.TableIdentifier identifier, boolean purge)booleandropView(org.apache.iceberg.catalog.TableIdentifier identifier)voidinitialize(java.lang.String name, java.util.Map<java.lang.String,java.lang.String> options)voidinitialize(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-configuredNessieIcebergClientandFileIOinstance.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.List<org.apache.iceberg.catalog.TableIdentifier>listViews(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 and return its properties.java.lang.Stringname()protected org.apache.iceberg.TableOperationsnewTableOps(org.apache.iceberg.catalog.TableIdentifier tableIdentifier)protected org.apache.iceberg.view.ViewOperationsnewViewOps(org.apache.iceberg.catalog.TableIdentifier identifier)protected java.util.Map<java.lang.String,java.lang.String>properties()booleanremoveProperties(org.apache.iceberg.catalog.Namespace namespace, java.util.Set<java.lang.String> properties)voidrenameTable(org.apache.iceberg.catalog.TableIdentifier from, org.apache.iceberg.catalog.TableIdentifier to)voidrenameView(org.apache.iceberg.catalog.TableIdentifier from, org.apache.iceberg.catalog.TableIdentifier to)voidsetConf(java.lang.Object conf)booleansetProperties(org.apache.iceberg.catalog.Namespace namespace, java.util.Map<java.lang.String,java.lang.String> properties)-
Methods inherited from class org.apache.iceberg.view.BaseMetastoreViewCatalog
buildTable, buildView, loadView
-
Methods inherited from class org.apache.iceberg.BaseMetastoreCatalog
fullTableName, isValidIdentifier, loadTable, metricsReporter, registerTable, toString
-
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
-
Methods inherited from interface org.apache.iceberg.catalog.Catalog
createTable, createTable, createTable, createTable, dropTable, invalidateTable, newCreateTableTransaction, newCreateTableTransaction, newCreateTableTransaction, newCreateTableTransaction, newReplaceTableTransaction, newReplaceTableTransaction, newReplaceTableTransaction, newReplaceTableTransaction, tableExists
-
-
-
-
Method Detail
-
initialize
public void initialize(java.lang.String name, java.util.Map<java.lang.String,java.lang.String> options)- Specified by:
initializein interfaceorg.apache.iceberg.catalog.Catalog- Specified by:
initializein interfaceorg.apache.iceberg.catalog.ViewCatalog- Overrides:
initializein classorg.apache.iceberg.view.BaseMetastoreViewCatalog
-
initialize
public 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-configuredNessieIcebergClientandFileIOinstance.- Parameters:
name- The name of the catalog, defaults to "nessie" ifnullclient- The pre-configuredNessieIcebergClientinstance to usefileIO- TheFileIOinstance to usecatalogOptions- The catalog options to use
-
close
public void close() throws java.io.IOException- Specified by:
closein interfacejava.lang.AutoCloseable- Specified by:
closein interfacejava.io.Closeable- Overrides:
closein classorg.apache.iceberg.BaseMetastoreCatalog- Throws:
java.io.IOException
-
name
public java.lang.String name()
- Specified by:
namein interfaceorg.apache.iceberg.catalog.Catalog- Specified by:
namein interfaceorg.apache.iceberg.catalog.ViewCatalog- Overrides:
namein classorg.apache.iceberg.view.BaseMetastoreViewCatalog
-
newTableOps
protected org.apache.iceberg.TableOperations newTableOps(org.apache.iceberg.catalog.TableIdentifier tableIdentifier)
- Specified by:
newTableOpsin classorg.apache.iceberg.BaseMetastoreCatalog
-
defaultWarehouseLocation
protected java.lang.String defaultWarehouseLocation(org.apache.iceberg.catalog.TableIdentifier table)
- Specified by:
defaultWarehouseLocationin classorg.apache.iceberg.BaseMetastoreCatalog
-
listTables
public java.util.List<org.apache.iceberg.catalog.TableIdentifier> listTables(org.apache.iceberg.catalog.Namespace namespace)
- Specified by:
listTablesin interfaceorg.apache.iceberg.catalog.Catalog
-
dropTable
public boolean dropTable(org.apache.iceberg.catalog.TableIdentifier identifier, boolean purge)- Specified by:
dropTablein interfaceorg.apache.iceberg.catalog.Catalog
-
renameTable
public void renameTable(org.apache.iceberg.catalog.TableIdentifier from, org.apache.iceberg.catalog.TableIdentifier to)- Specified by:
renameTablein interfaceorg.apache.iceberg.catalog.Catalog
-
createNamespace
public void createNamespace(org.apache.iceberg.catalog.Namespace namespace, java.util.Map<java.lang.String,java.lang.String> metadata)- Specified by:
createNamespacein interfaceorg.apache.iceberg.catalog.SupportsNamespaces
-
listNamespaces
public java.util.List<org.apache.iceberg.catalog.Namespace> listNamespaces(org.apache.iceberg.catalog.Namespace namespace) throws org.apache.iceberg.exceptions.NoSuchNamespaceException- Specified by:
listNamespacesin interfaceorg.apache.iceberg.catalog.SupportsNamespaces- Throws:
org.apache.iceberg.exceptions.NoSuchNamespaceException
-
loadNamespaceMetadata
public java.util.Map<java.lang.String,java.lang.String> loadNamespaceMetadata(org.apache.iceberg.catalog.Namespace namespace) throws org.apache.iceberg.exceptions.NoSuchNamespaceExceptionLoad the given namespace and return its properties.- Specified by:
loadNamespaceMetadatain interfaceorg.apache.iceberg.catalog.SupportsNamespaces- Parameters:
namespace- a namespace.Namespace- Returns:
- a string map of properties for the given namespace
- Throws:
org.apache.iceberg.exceptions.NoSuchNamespaceException- If the namespace does not exist
-
dropNamespace
public boolean dropNamespace(org.apache.iceberg.catalog.Namespace namespace) throws org.apache.iceberg.exceptions.NamespaceNotEmptyException- Specified by:
dropNamespacein interfaceorg.apache.iceberg.catalog.SupportsNamespaces- Throws:
org.apache.iceberg.exceptions.NamespaceNotEmptyException
-
setProperties
public boolean setProperties(org.apache.iceberg.catalog.Namespace namespace, java.util.Map<java.lang.String,java.lang.String> properties)- Specified by:
setPropertiesin interfaceorg.apache.iceberg.catalog.SupportsNamespaces
-
removeProperties
public boolean removeProperties(org.apache.iceberg.catalog.Namespace namespace, java.util.Set<java.lang.String> properties)- Specified by:
removePropertiesin interfaceorg.apache.iceberg.catalog.SupportsNamespaces
-
setConf
public void setConf(java.lang.Object conf)
- Specified by:
setConfin interfaceorg.apache.iceberg.hadoop.Configurable<java.lang.Object>
-
properties
protected java.util.Map<java.lang.String,java.lang.String> properties()
- Overrides:
propertiesin classorg.apache.iceberg.BaseMetastoreCatalog
-
newViewOps
protected org.apache.iceberg.view.ViewOperations newViewOps(org.apache.iceberg.catalog.TableIdentifier identifier)
- Specified by:
newViewOpsin classorg.apache.iceberg.view.BaseMetastoreViewCatalog
-
listViews
public java.util.List<org.apache.iceberg.catalog.TableIdentifier> listViews(org.apache.iceberg.catalog.Namespace namespace)
- Specified by:
listViewsin interfaceorg.apache.iceberg.catalog.ViewCatalog
-
dropView
public boolean dropView(org.apache.iceberg.catalog.TableIdentifier identifier)
- Specified by:
dropViewin interfaceorg.apache.iceberg.catalog.ViewCatalog
-
renameView
public void renameView(org.apache.iceberg.catalog.TableIdentifier from, org.apache.iceberg.catalog.TableIdentifier to)- Specified by:
renameViewin interfaceorg.apache.iceberg.catalog.ViewCatalog
-
-