Package org.apache.iceberg
Class BaseMetastoreCatalog
- java.lang.Object
-
- org.apache.iceberg.BaseMetastoreCatalog
-
- All Implemented Interfaces:
java.io.Closeable,java.lang.AutoCloseable,Catalog
- Direct Known Subclasses:
BaseMetastoreViewCatalog,DynamoDbCatalog,EcsCatalog,GlueCatalog,HadoopCatalog,SnowflakeCatalog
public abstract class BaseMetastoreCatalog extends java.lang.Object implements Catalog, java.io.Closeable
-
-
Nested Class Summary
Nested Classes Modifier and Type Class Description protected classBaseMetastoreCatalog.BaseMetastoreCatalogTableBuilder-
Nested classes/interfaces inherited from interface org.apache.iceberg.catalog.Catalog
Catalog.TableBuilder
-
-
Constructor Summary
Constructors Constructor Description BaseMetastoreCatalog()
-
Method Summary
All Methods Static Methods Instance Methods Abstract Methods Concrete Methods Modifier and Type Method Description Catalog.TableBuilderbuildTable(TableIdentifier identifier, Schema schema)/** Instantiate a builder to either create a table or start a create/replace transaction.voidclose()protected abstract java.lang.StringdefaultWarehouseLocation(TableIdentifier tableIdentifier)protected static java.lang.StringfullTableName(java.lang.String catalogName, TableIdentifier identifier)protected booleanisValidIdentifier(TableIdentifier tableIdentifier)TableloadTable(TableIdentifier identifier)Load a table.protected MetricsReportermetricsReporter()protected abstract TableOperationsnewTableOps(TableIdentifier tableIdentifier)protected java.util.Map<java.lang.String,java.lang.String>properties()TableregisterTable(TableIdentifier identifier, java.lang.String metadataFileLocation)Register a table with the catalog if it does not exist.java.lang.StringtoString()-
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, dropTable, initialize, invalidateTable, listTables, name, newCreateTableTransaction, newCreateTableTransaction, newCreateTableTransaction, newCreateTableTransaction, newReplaceTableTransaction, newReplaceTableTransaction, newReplaceTableTransaction, newReplaceTableTransaction, renameTable, tableExists
-
-
-
-
Method Detail
-
loadTable
public Table loadTable(TableIdentifier identifier)
Description copied from interface:CatalogLoad a table.
-
registerTable
public Table registerTable(TableIdentifier identifier, java.lang.String metadataFileLocation)
Description copied from interface:CatalogRegister a table with the catalog if it does not exist.- Specified by:
registerTablein interfaceCatalog- Parameters:
identifier- a table identifiermetadataFileLocation- 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:
buildTablein interfaceCatalog- Parameters:
identifier- a table identifierschema- a schema- Returns:
- the builder to create a table or start a create/replace transaction
-
isValidIdentifier
protected boolean isValidIdentifier(TableIdentifier tableIdentifier)
-
properties
protected java.util.Map<java.lang.String,java.lang.String> properties()
-
toString
public java.lang.String toString()
- Overrides:
toStringin classjava.lang.Object
-
newTableOps
protected abstract TableOperations newTableOps(TableIdentifier tableIdentifier)
-
defaultWarehouseLocation
protected abstract java.lang.String defaultWarehouseLocation(TableIdentifier tableIdentifier)
-
fullTableName
protected static java.lang.String fullTableName(java.lang.String catalogName, TableIdentifier identifier)
-
metricsReporter
protected MetricsReporter metricsReporter()
-
close
public void close() throws java.io.IOException- Specified by:
closein interfacejava.lang.AutoCloseable- Specified by:
closein interfacejava.io.Closeable- Throws:
java.io.IOException
-
-