Package org.apache.flink.table.catalog
Interface CatalogStore
- All Known Implementing Classes:
AbstractCatalogStore
@PublicEvolving
public interface CatalogStore
Represents the storage where persists all
Catalogs.
All catalogs can be lazy initialized with the CatalogStore.
It can be used in CatalogManager to retrieve, save and remove catalog in CatalogDescriptor format at the external storage system.
-
Method Summary
Modifier and TypeMethodDescriptionvoidclose()Close the catalog store when it is no longer needed and release any resource that it might be holding.booleanReturn whether the catalog exists in the catalog store.getCatalog(String catalogName) Get a catalog by name.Retrieves the names of all registered catalogs.voidopen()Open the catalog store.voidremoveCatalog(String catalogName, boolean ignoreIfNotExists) Remove a catalog with the given catalog name.voidstoreCatalog(String catalogName, CatalogDescriptor catalog) Stores a catalog under the given catalog name.
-
Method Details
-
storeCatalog
Stores a catalog under the given catalog name. The catalog name must be unique.- Parameters:
catalogName- the given catalog name under which to store the given catalogcatalog- catalog descriptor to store- Throws:
CatalogException- throw when registration failed
-
removeCatalog
Remove a catalog with the given catalog name.- Parameters:
catalogName- the given catalog name under which to remove the given catalogignoreIfNotExists- whether throw an exception when the catalog does not exist- Throws:
CatalogException- throw when the removal operation failed
-
getCatalog
Get a catalog by name.- Parameters:
catalogName- name of the catalog to retrieve- Returns:
- the requested catalog or empty if the catalog does not exist
- Throws:
CatalogException- in case of any runtime exception
-
listCatalogs
Retrieves the names of all registered catalogs.- Returns:
- the names of registered catalogs
- Throws:
CatalogException- in case of any runtime exception
-
contains
Return whether the catalog exists in the catalog store.- Parameters:
catalogName- the name of catalog- Throws:
CatalogException- in case of any runtime exception
-
open
Open the catalog store. Used for any required preparation in initialization phase.- Throws:
CatalogException- in case of any runtime exception
-
close
Close the catalog store when it is no longer needed and release any resource that it might be holding.- Throws:
CatalogException- in case of any runtime exception
-