Package org.apache.iceberg.view
Class BaseMetastoreViewCatalog
java.lang.Object
org.apache.iceberg.BaseMetastoreCatalog
org.apache.iceberg.view.BaseMetastoreViewCatalog
- All Implemented Interfaces:
Closeable,AutoCloseable,Catalog,ViewCatalog
- Direct Known Subclasses:
HiveCatalog,InMemoryCatalog,JdbcCatalog,NessieCatalog
-
Nested Class Summary
Nested ClassesModifier and TypeClassDescriptionprotected classThe purpose of this class is to add view detection when replacing a tableprotected classNested classes/interfaces inherited from class org.apache.iceberg.BaseMetastoreCatalog
BaseMetastoreCatalog.BaseMetastoreCatalogTableBuilderNested classes/interfaces inherited from interface org.apache.iceberg.catalog.Catalog
Catalog.TableBuilder -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionbuildTable(TableIdentifier identifier, Schema schema) Instantiate a builder to either create a table or start a create/replace transaction.buildView(TableIdentifier identifier) Instantiate a builder to create or replace a SQL view.voidinitialize(String name, Map<String, String> properties) Initialize a view catalog given a custom name and a map of catalog properties.loadView(TableIdentifier identifier) Load a view.name()Return the name for this catalog.protected abstract ViewOperationsnewViewOps(TableIdentifier identifier) Methods inherited from class org.apache.iceberg.BaseMetastoreCatalog
close, defaultWarehouseLocation, fullTableName, isValidIdentifier, isValidMetadataIdentifier, loadTable, metricsReporter, newTableOps, properties, registerTable, toStringMethods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, waitMethods inherited from interface org.apache.iceberg.catalog.Catalog
createTable, createTable, createTable, createTable, dropTable, dropTable, invalidateTable, listTables, newCreateTableTransaction, newCreateTableTransaction, newCreateTableTransaction, newCreateTableTransaction, newReplaceTableTransaction, newReplaceTableTransaction, newReplaceTableTransaction, newReplaceTableTransaction, renameTable, tableExistsMethods inherited from interface org.apache.iceberg.catalog.ViewCatalog
dropView, invalidateView, listViews, renameView, viewExists
-
Constructor Details
-
BaseMetastoreViewCatalog
public BaseMetastoreViewCatalog()
-
-
Method Details
-
newViewOps
-
initialize
Description copied from interface:ViewCatalogInitialize 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:
initializein interfaceCatalog- Specified by:
initializein interfaceViewCatalog- Parameters:
name- a custom name for the catalogproperties- catalog properties
-
name
Description copied from interface:ViewCatalogReturn the name for this catalog.- Specified by:
namein interfaceCatalog- Specified by:
namein interfaceViewCatalog- Returns:
- this catalog's name
-
loadView
Description copied from interface:ViewCatalogLoad a view.- Specified by:
loadViewin interfaceViewCatalog- Parameters:
identifier- a view identifier- Returns:
- instance of
Viewimplementation referred by the identifier
-
buildView
Description copied from interface:ViewCatalogInstantiate a builder to create or replace a SQL view.- Specified by:
buildViewin interfaceViewCatalog- Parameters:
identifier- a view identifier- Returns:
- a view builder
-
buildTable
Description copied from interface:CatalogInstantiate a builder to either create a table or start a create/replace transaction.- Specified by:
buildTablein interfaceCatalog- Overrides:
buildTablein classBaseMetastoreCatalog- Parameters:
identifier- a table identifierschema- a schema- Returns:
- the builder to create a table or start a create/replace transaction
-