public abstract class BaseMetastoreViewCatalog extends BaseMetastoreCatalog implements ViewCatalog
Modifier and Type | Class and Description |
---|---|
protected class |
BaseMetastoreViewCatalog.BaseMetastoreViewCatalogTableBuilder
The purpose of this class is to add view detection when replacing a table
|
protected class |
BaseMetastoreViewCatalog.BaseViewBuilder |
BaseMetastoreCatalog.BaseMetastoreCatalogTableBuilder
Catalog.TableBuilder
Constructor and Description |
---|
BaseMetastoreViewCatalog() |
Modifier and Type | Method and Description |
---|---|
Catalog.TableBuilder |
buildTable(TableIdentifier identifier,
Schema schema)
/** Instantiate a builder to either create a table or start a create/replace transaction.
|
ViewBuilder |
buildView(TableIdentifier identifier)
Instantiate a builder to create or replace a SQL view.
|
void |
initialize(java.lang.String name,
java.util.Map<java.lang.String,java.lang.String> properties)
Initialize a view catalog given a custom name and a map of catalog properties.
|
View |
loadView(TableIdentifier identifier)
Load a view.
|
java.lang.String |
name()
Return the name for this catalog.
|
protected abstract ViewOperations |
newViewOps(TableIdentifier identifier) |
close, defaultWarehouseLocation, fullTableName, isValidIdentifier, loadTable, metricsReporter, newTableOps, properties, registerTable, toString
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
dropView, invalidateView, listViews, renameView, viewExists
createTable, createTable, createTable, createTable, dropTable, dropTable, invalidateTable, listTables, newCreateTableTransaction, newCreateTableTransaction, newCreateTableTransaction, newCreateTableTransaction, newReplaceTableTransaction, newReplaceTableTransaction, newReplaceTableTransaction, newReplaceTableTransaction, renameTable, tableExists
protected abstract ViewOperations newViewOps(TableIdentifier identifier)
public void initialize(java.lang.String name, java.util.Map<java.lang.String,java.lang.String> properties)
ViewCatalog
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.
initialize
in interface Catalog
initialize
in interface ViewCatalog
name
- a custom name for the catalogproperties
- catalog propertiespublic java.lang.String name()
ViewCatalog
name
in interface Catalog
name
in interface ViewCatalog
public View loadView(TableIdentifier identifier)
ViewCatalog
loadView
in interface ViewCatalog
identifier
- a view identifierView
implementation referred by the identifierpublic ViewBuilder buildView(TableIdentifier identifier)
ViewCatalog
buildView
in interface ViewCatalog
identifier
- a view identifierpublic Catalog.TableBuilder buildTable(TableIdentifier identifier, Schema schema)
Catalog
buildTable
in interface Catalog
buildTable
in class BaseMetastoreCatalog
identifier
- a table identifierschema
- a schema