Interface Catalog
- All Known Implementing Classes:
IcebergCatalog,InMemoryCatalog
Represents a named and configurable container for managing tables. Is defined with a type and
configuration properties. Uses an underlying
MetaStore to manage tables and table
providers.-
Field Summary
Fields -
Method Summary
Modifier and TypeMethodDescriptionbooleancreateDatabase(String databaseName) Creates a database with this name.Produces the currently active database.booleandatabaseExists(String db) Returns true if the database exists.Returns a collection of existing database names.booleandropDatabase(String databaseName, boolean cascade) Drops the database with this name.Returns the underlyingMetaStorefor this database.name()The name of this catalog, specified by the user.User-specified configuration properties.voidregisterTableProvider(TableProvider provider) Registers thisTableProviderand propagates it to underlyingMetaStores.Returns all theTableProviders available to thisCatalog, organized by type.type()A type that defines this catalog.voiduseDatabase(String databaseName) Switches to use the specified database.
-
Field Details
-
DEFAULT
- See Also:
-
-
Method Details
-
type
String type()A type that defines this catalog. -
metaStore
-
currentDatabase
Produces the currently active database. Can be null if no database is active.- Returns:
- the current active database
-
databases
Collection<String> databases()Returns a collection of existing database names. -
createDatabase
Creates a database with this name.- Parameters:
databaseName-- Returns:
- true if the database was created, false otherwise.
-
databaseExists
Returns true if the database exists. -
useDatabase
Switches to use the specified database.- Parameters:
databaseName-
-
dropDatabase
Drops the database with this name. If cascade is true, the catalog should first drop all tables contained in this database.- Parameters:
databaseName-cascade-- Returns:
- true if the database was dropped, false otherwise.
-
name
String name()The name of this catalog, specified by the user. -
properties
User-specified configuration properties. -
registerTableProvider
Registers thisTableProviderand propagates it to underlyingMetaStores. -
tableProviders
Map<String,TableProvider> tableProviders()Returns all theTableProviders available to thisCatalog, organized by type.
-