Class 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
    • Method Summary

      All Methods Instance Methods Concrete Methods 
      Modifier and Type Method Description
      void close()  
      void create​(java.lang.String viewIdentifier, ViewDefinition viewDefinition, java.util.Map<java.lang.String,​java.lang.String> properties)
      Create a view without replacing any existing view.
      protected java.lang.String defaultWarehouseLocation​(org.apache.iceberg.catalog.TableIdentifier tableIdentifier)  
      void drop​(java.lang.String viewIdentifier)
      Drops a view.
      boolean dropTable​(org.apache.iceberg.catalog.TableIdentifier tableIdentifier, boolean purge)  
      NessieViewCatalog getViewCatalog()  
      void initialize​(java.lang.String name, java.util.Map<java.lang.String,​java.lang.String> properties)  
      java.util.List<org.apache.iceberg.catalog.TableIdentifier> listTables​(org.apache.iceberg.catalog.Namespace namespace)  
      View load​(java.lang.String viewIdentifier)
      Loads a view by name.
      ViewDefinition loadDefinition​(java.lang.String viewIdentifier)
      Loads a view by name.
      protected org.apache.iceberg.TableOperations newTableOps​(org.apache.iceberg.catalog.TableIdentifier tableIdentifier)  
      void refresh()  
      void renameTable​(org.apache.iceberg.catalog.TableIdentifier from, org.apache.iceberg.catalog.TableIdentifier to)  
      void replace​(java.lang.String viewIdentifier, ViewDefinition viewDefinition, java.util.Map<java.lang.String,​java.lang.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, 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, registerTable, tableExists
      • Methods inherited from interface org.apache.iceberg.view.Views

        rename
    • Constructor Detail

      • NessieExtCatalog

        public NessieExtCatalog()
    • Method Detail

      • initialize

        public void initialize​(java.lang.String name,
                               java.util.Map<java.lang.String,​java.lang.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 java.lang.String defaultWarehouseLocation​(org.apache.iceberg.catalog.TableIdentifier tableIdentifier)
        Specified by:
        defaultWarehouseLocation in class org.apache.iceberg.BaseMetastoreCatalog
      • listTables

        public java.util.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​(java.lang.String viewIdentifier,
                           ViewDefinition viewDefinition,
                           java.util.Map<java.lang.String,​java.lang.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​(java.lang.String viewIdentifier,
                            ViewDefinition viewDefinition,
                            java.util.Map<java.lang.String,​java.lang.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​(java.lang.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​(java.lang.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​(java.lang.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 java.io.IOException
        Throws:
        java.io.IOException