Class InMemoryCatalog
java.lang.Object
org.apache.beam.sdk.extensions.sql.meta.catalog.InMemoryCatalog
- All Implemented Interfaces:
Catalog
- Direct Known Subclasses:
IcebergCatalog
-
Field Summary
Fields -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionbooleancreateDatabase(String database) Creates a database with this name.Produces the currently active database.booleandropDatabase(String database, boolean cascade) Drops the database with this name.Returns a set of existing databases accessible to this catalog.The underlyingMetaStorethat actually manages tables.name()The name of this catalog, specified by the user.User-specified configuration properties.type()A type that defines this catalog.voiduseDatabase(String database) Switches to use the specified database.
-
Field Details
-
currentDatabase
-
-
Constructor Details
-
InMemoryCatalog
-
-
Method Details
-
type
Description copied from interface:CatalogA type that defines this catalog. -
name
Description copied from interface:CatalogThe name of this catalog, specified by the user. -
metaStore
Description copied from interface:CatalogThe underlyingMetaStorethat actually manages tables. -
properties
Description copied from interface:CatalogUser-specified configuration properties.- Specified by:
propertiesin interfaceCatalog
-
createDatabase
Description copied from interface:CatalogCreates a database with this name.- Specified by:
createDatabasein interfaceCatalog- Parameters:
database-- Returns:
- true if the database was created, false otherwise.
-
useDatabase
Description copied from interface:CatalogSwitches to use the specified database.- Specified by:
useDatabasein interfaceCatalog- Parameters:
database-
-
currentDatabase
Description copied from interface:CatalogProduces the currently active database. Can be null if no database is active.- Specified by:
currentDatabasein interfaceCatalog- Returns:
- the current active database
-
dropDatabase
Description copied from interface:CatalogDrops the database with this name. If cascade is true, the catalog should first drop all tables contained in this database.- Specified by:
dropDatabasein interfaceCatalog- Parameters:
database-cascade-- Returns:
- true if the database was dropped, false otherwise.
-
listDatabases
Description copied from interface:CatalogReturns a set of existing databases accessible to this catalog.- Specified by:
listDatabasesin interfaceCatalog- Returns:
- a set of existing database names
-