Class NessieExtCatalog

java.lang.Object
org.apache.iceberg.BaseMetastoreCatalog
org.apache.iceberg.nessie.NessieExtCatalog
All Implemented Interfaces:
org.apache.iceberg.catalog.Catalog, Views

public class NessieExtCatalog extends org.apache.iceberg.BaseMetastoreCatalog implements Views
This is a wrapper catalog that supports both Iceberg Views and Tables. USE AT YOUR OWN RISK / EXPERIMENTAL CODE.
  • Nested Class Summary

    Nested classes/interfaces inherited from class org.apache.iceberg.BaseMetastoreCatalog

    org.apache.iceberg.BaseMetastoreCatalog.BaseMetastoreCatalogTableBuilder

    Nested classes/interfaces inherited from interface org.apache.iceberg.catalog.Catalog

    org.apache.iceberg.catalog.Catalog.TableBuilder
  • Constructor Summary

    Constructors
    Constructor
    Description
     
  • Method Summary

    Modifier and Type
    Method
    Description
    void
     
    void
    create(String viewIdentifier, ViewDefinition viewDefinition, Map<String,String> properties)
    Create a view without replacing any existing view.
    protected String
    defaultWarehouseLocation(org.apache.iceberg.catalog.TableIdentifier tableIdentifier)
     
    void
    drop(String viewIdentifier)
    Drops a view.
    boolean
    dropTable(org.apache.iceberg.catalog.TableIdentifier tableIdentifier, boolean purge)
     
     
    void
    initialize(String name, Map<String,String> properties)
     
    List<org.apache.iceberg.catalog.TableIdentifier>
    listTables(org.apache.iceberg.catalog.Namespace namespace)
     
    load(String viewIdentifier)
    Loads a view by name.
    loadDefinition(String viewIdentifier)
    Loads a view by name.
    protected org.apache.iceberg.TableOperations
    newTableOps(org.apache.iceberg.catalog.TableIdentifier tableIdentifier)
     
    void
     
    void
    renameTable(org.apache.iceberg.catalog.TableIdentifier from, org.apache.iceberg.catalog.TableIdentifier to)
     
    void
    replace(String viewIdentifier, ViewDefinition viewDefinition, Map<String,String> properties)
    Replaces a view.
    void
    setConf(org.apache.hadoop.conf.Configuration conf)
     

    Methods inherited from class org.apache.iceberg.BaseMetastoreCatalog

    buildTable, fullTableName, isValidIdentifier, loadTable, properties, 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, name, newCreateTableTransaction, newCreateTableTransaction, newCreateTableTransaction, newCreateTableTransaction, newReplaceTableTransaction, newReplaceTableTransaction, newReplaceTableTransaction, newReplaceTableTransaction, tableExists

    Methods inherited from interface org.apache.iceberg.viewdepoc.Views

    rename
  • Constructor Details

    • NessieExtCatalog

      public NessieExtCatalog()
  • Method Details

    • initialize

      public void initialize(String name, Map<String,String> properties)
      Specified by:
      initialize in interface org.apache.iceberg.catalog.Catalog
    • newTableOps

      protected org.apache.iceberg.TableOperations newTableOps(org.apache.iceberg.catalog.TableIdentifier tableIdentifier)
      Specified by:
      newTableOps in class org.apache.iceberg.BaseMetastoreCatalog
    • defaultWarehouseLocation

      protected String defaultWarehouseLocation(org.apache.iceberg.catalog.TableIdentifier tableIdentifier)
      Specified by:
      defaultWarehouseLocation in class org.apache.iceberg.BaseMetastoreCatalog
    • listTables

      public List<org.apache.iceberg.catalog.TableIdentifier> listTables(org.apache.iceberg.catalog.Namespace namespace)
      Specified by:
      listTables in interface org.apache.iceberg.catalog.Catalog
    • dropTable

      public boolean dropTable(org.apache.iceberg.catalog.TableIdentifier tableIdentifier, boolean purge)
      Specified by:
      dropTable in interface org.apache.iceberg.catalog.Catalog
    • renameTable

      public void renameTable(org.apache.iceberg.catalog.TableIdentifier from, org.apache.iceberg.catalog.TableIdentifier to)
      Specified by:
      renameTable in interface org.apache.iceberg.catalog.Catalog
    • create

      public void create(String viewIdentifier, ViewDefinition viewDefinition, Map<String,String> properties)
      Description copied from interface: Views
      Create a view without replacing any existing view.
      Specified by:
      create in interface Views
      Parameters:
      viewIdentifier - view name or location
      viewDefinition - SQL metadata of the view
      properties - Version property genie-id of the operation, as well as table properties such as owner, table type, common view flag etc.
    • replace

      public void replace(String viewIdentifier, ViewDefinition viewDefinition, Map<String,String> properties)
      Description copied from interface: Views
      Replaces a view.
      Specified by:
      replace in interface Views
      Parameters:
      viewIdentifier - view name or location
      viewDefinition - SQL metadata of the view
      properties - Version property genie-id of the operation, as well as table properties such as owner, table type, common view flag etc.
    • load

      public View load(String viewIdentifier)
      Description copied from interface: Views
      Loads a view by name.
      Specified by:
      load in interface Views
      Parameters:
      viewIdentifier - view name or location
      Returns:
      All the metadata of the view
    • loadDefinition

      public ViewDefinition loadDefinition(String viewIdentifier)
      Description copied from interface: Views
      Loads a view by name.
      Specified by:
      loadDefinition in interface Views
      Parameters:
      viewIdentifier - view name or location
      Returns:
      SQL metadata of the view
    • drop

      public void drop(String viewIdentifier)
      Description copied from interface: Views
      Drops a view.
      Specified by:
      drop in interface Views
      Parameters:
      viewIdentifier - view name or location
    • setConf

      public void setConf(org.apache.hadoop.conf.Configuration conf)
    • refresh

      public void refresh() throws org.projectnessie.error.NessieNotFoundException
      Throws:
      org.projectnessie.error.NessieNotFoundException
    • close

      public void close() throws IOException
      Throws:
      IOException
    • getViewCatalog

      public NessieViewCatalog getViewCatalog()