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.BaseMetastoreCatalogTableBuilderCatalog.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, toStringclone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, waitdropView, invalidateView, listViews, renameView, viewExistscreateTable, createTable, createTable, createTable, dropTable, dropTable, invalidateTable, listTables, newCreateTableTransaction, newCreateTableTransaction, newCreateTableTransaction, newCreateTableTransaction, newReplaceTableTransaction, newReplaceTableTransaction, newReplaceTableTransaction, newReplaceTableTransaction, renameTable, tableExistsprotected abstract ViewOperations newViewOps(TableIdentifier identifier)
public void initialize(java.lang.String name,
java.util.Map<java.lang.String,java.lang.String> properties)
ViewCatalogA 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 Cataloginitialize in interface ViewCatalogname - a custom name for the catalogproperties - catalog propertiespublic java.lang.String name()
ViewCatalogname in interface Catalogname in interface ViewCatalogpublic View loadView(TableIdentifier identifier)
ViewCatalogloadView in interface ViewCatalogidentifier - a view identifierView implementation referred by the identifierpublic ViewBuilder buildView(TableIdentifier identifier)
ViewCatalogbuildView in interface ViewCatalogidentifier - a view identifierpublic Catalog.TableBuilder buildTable(TableIdentifier identifier, Schema schema)
CatalogbuildTable in interface CatalogbuildTable in class BaseMetastoreCatalogidentifier - a table identifierschema - a schema