Class BaseMetastoreViewCatalog

java.lang.Object
org.apache.iceberg.BaseMetastoreCatalog
org.apache.iceberg.view.BaseMetastoreViewCatalog
All Implemented Interfaces:
Closeable, AutoCloseable, Catalog, ViewCatalog
Direct Known Subclasses:
InMemoryCatalog, JdbcCatalog, NessieCatalog

public abstract class BaseMetastoreViewCatalog extends BaseMetastoreCatalog implements ViewCatalog
  • Constructor Details

    • BaseMetastoreViewCatalog

      public BaseMetastoreViewCatalog()
  • Method Details

    • newViewOps

      protected abstract ViewOperations newViewOps(TableIdentifier identifier)
    • initialize

      public void initialize(String name, Map<String,String> properties)
      Description copied from interface: ViewCatalog
      Initialize a view catalog given a custom name and a map of catalog properties.

      A custom view catalog implementation must have a no-arg constructor. A compute engine like Spark or Flink will first initialize the catalog without any arguments, and then call this method to complete catalog initialization with properties passed into the engine.

      Specified by:
      initialize in interface Catalog
      Specified by:
      initialize in interface ViewCatalog
      Parameters:
      name - a custom name for the catalog
      properties - catalog properties
    • name

      public String name()
      Description copied from interface: ViewCatalog
      Return the name for this catalog.
      Specified by:
      name in interface Catalog
      Specified by:
      name in interface ViewCatalog
      Returns:
      this catalog's name
    • loadView

      public View loadView(TableIdentifier identifier)
      Description copied from interface: ViewCatalog
      Load a view.
      Specified by:
      loadView in interface ViewCatalog
      Parameters:
      identifier - a view identifier
      Returns:
      instance of View implementation referred by the identifier
    • buildView

      public ViewBuilder buildView(TableIdentifier identifier)
      Description copied from interface: ViewCatalog
      Instantiate a builder to create or replace a SQL view.
      Specified by:
      buildView in interface ViewCatalog
      Parameters:
      identifier - a view identifier
      Returns:
      a view builder
    • buildTable

      public Catalog.TableBuilder buildTable(TableIdentifier identifier, Schema schema)
      Description copied from interface: Catalog
      /** Instantiate a builder to either create a table or start a create/replace transaction.
      Specified by:
      buildTable in interface Catalog
      Overrides:
      buildTable in class BaseMetastoreCatalog
      Parameters:
      identifier - a table identifier
      schema - a schema
      Returns:
      the builder to create a table or start a create/replace transaction