Class BaseMetastoreCatalog

java.lang.Object
org.apache.iceberg.BaseMetastoreCatalog
All Implemented Interfaces:
Closeable, AutoCloseable, Catalog
Direct Known Subclasses:
BaseMetastoreViewCatalog, DynamoDbCatalog, EcsCatalog, GlueCatalog, HadoopCatalog, SnowflakeCatalog

public abstract class BaseMetastoreCatalog extends Object implements Catalog, Closeable
  • Constructor Details

    • BaseMetastoreCatalog

      public BaseMetastoreCatalog()
  • Method Details

    • loadTable

      public Table loadTable(TableIdentifier identifier)
      Description copied from interface: Catalog
      Load a table.
      Specified by:
      loadTable in interface Catalog
      Parameters:
      identifier - a table identifier
      Returns:
      instance of Table implementation referred by tableIdentifier
    • registerTable

      public Table registerTable(TableIdentifier identifier, String metadataFileLocation)
      Description copied from interface: Catalog
      Register a table with the catalog if it does not exist.
      Specified by:
      registerTable in interface Catalog
      Parameters:
      identifier - a table identifier
      metadataFileLocation - the location of a metadata file
      Returns:
      a Table instance
    • 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
      Parameters:
      identifier - a table identifier
      schema - a schema
      Returns:
      the builder to create a table or start a create/replace transaction
    • isValidIdentifier

      protected boolean isValidIdentifier(TableIdentifier tableIdentifier)
    • properties

      protected Map<String,String> properties()
    • toString

      public String toString()
      Overrides:
      toString in class Object
    • newTableOps

      protected abstract TableOperations newTableOps(TableIdentifier tableIdentifier)
    • defaultWarehouseLocation

      protected abstract String defaultWarehouseLocation(TableIdentifier tableIdentifier)
    • fullTableName

      protected static String fullTableName(String catalogName, TableIdentifier identifier)
    • metricsReporter

      protected MetricsReporter metricsReporter()
    • close

      public void close() throws IOException
      Specified by:
      close in interface AutoCloseable
      Specified by:
      close in interface Closeable
      Throws:
      IOException