public class BaseViewSessionCatalog.AsViewCatalog extends java.lang.Object implements ViewCatalog
| Modifier and Type | Method and Description |
|---|---|
ViewBuilder |
buildView(TableIdentifier identifier)
Instantiate a builder to create or replace a SQL view.
|
boolean |
dropView(TableIdentifier identifier)
Drop a 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.
|
void |
invalidateView(TableIdentifier identifier)
Invalidate cached view metadata from current catalog.
|
java.util.List<TableIdentifier> |
listViews(Namespace namespace)
Return all the identifiers under this namespace.
|
View |
loadView(TableIdentifier identifier)
Load a view.
|
java.lang.String |
name()
Return the name for this catalog.
|
void |
renameView(TableIdentifier from,
TableIdentifier to)
Rename a view.
|
boolean |
viewExists(TableIdentifier identifier)
Check whether view exists.
|
public java.lang.String name()
ViewCatalogname in interface ViewCatalogpublic java.util.List<TableIdentifier> listViews(Namespace namespace)
ViewCataloglistViews in interface ViewCatalognamespace - a namespacepublic View loadView(TableIdentifier identifier)
ViewCatalogloadView in interface ViewCatalogidentifier - a view identifierView implementation referred by the identifierpublic boolean viewExists(TableIdentifier identifier)
ViewCatalogviewExists in interface ViewCatalogidentifier - a view identifierpublic ViewBuilder buildView(TableIdentifier identifier)
ViewCatalogbuildView in interface ViewCatalogidentifier - a view identifierpublic boolean dropView(TableIdentifier identifier)
ViewCatalogdropView in interface ViewCatalogidentifier - a view identifierpublic void renameView(TableIdentifier from, TableIdentifier to)
ViewCatalogrenameView in interface ViewCatalogfrom - identifier of the view to renameto - new view identifierpublic void invalidateView(TableIdentifier identifier)
ViewCatalogIf the view is already loaded or cached, drop cached data. If the view does not exist or is not cached, do nothing.
invalidateView in interface ViewCatalogidentifier - a view identifierpublic 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 ViewCatalogname - a custom name for the catalogproperties - catalog properties