public class FlinkCatalog
extends org.apache.flink.table.catalog.AbstractCatalog
Catalog.
The mapping between Flink database and Iceberg namespace: Supplying a base namespace for a given catalog, so if you have a catalog that supports a 2-level namespace, you would supply the first level in the catalog configuration and the second level would be exposed as Flink databases.
The Iceberg table manages its partitions by itself. The partition of the Iceberg table is independent of the partition of Flink.
| Constructor and Description |
|---|
FlinkCatalog(java.lang.String catalogName,
java.lang.String defaultDatabase,
Namespace baseNamespace,
CatalogLoader catalogLoader,
boolean cacheEnabled,
long cacheExpirationIntervalMs) |
| Modifier and Type | Method and Description |
|---|---|
void |
alterDatabase(java.lang.String name,
org.apache.flink.table.catalog.CatalogDatabase newDatabase,
boolean ignoreIfNotExists) |
void |
alterFunction(org.apache.flink.table.catalog.ObjectPath functionPath,
org.apache.flink.table.catalog.CatalogFunction newFunction,
boolean ignoreIfNotExists) |
void |
alterPartition(org.apache.flink.table.catalog.ObjectPath tablePath,
org.apache.flink.table.catalog.CatalogPartitionSpec partitionSpec,
org.apache.flink.table.catalog.CatalogPartition newPartition,
boolean ignoreIfNotExists) |
void |
alterPartitionColumnStatistics(org.apache.flink.table.catalog.ObjectPath tablePath,
org.apache.flink.table.catalog.CatalogPartitionSpec partitionSpec,
org.apache.flink.table.catalog.stats.CatalogColumnStatistics columnStatistics,
boolean ignoreIfNotExists) |
void |
alterPartitionStatistics(org.apache.flink.table.catalog.ObjectPath tablePath,
org.apache.flink.table.catalog.CatalogPartitionSpec partitionSpec,
org.apache.flink.table.catalog.stats.CatalogTableStatistics partitionStatistics,
boolean ignoreIfNotExists) |
void |
alterTable(org.apache.flink.table.catalog.ObjectPath tablePath,
org.apache.flink.table.catalog.CatalogBaseTable newTable,
boolean ignoreIfNotExists) |
void |
alterTableColumnStatistics(org.apache.flink.table.catalog.ObjectPath tablePath,
org.apache.flink.table.catalog.stats.CatalogColumnStatistics columnStatistics,
boolean ignoreIfNotExists) |
void |
alterTableStatistics(org.apache.flink.table.catalog.ObjectPath tablePath,
org.apache.flink.table.catalog.stats.CatalogTableStatistics tableStatistics,
boolean ignoreIfNotExists) |
Catalog |
catalog() |
void |
close() |
void |
createDatabase(java.lang.String name,
org.apache.flink.table.catalog.CatalogDatabase database,
boolean ignoreIfExists) |
void |
createFunction(org.apache.flink.table.catalog.ObjectPath functionPath,
org.apache.flink.table.catalog.CatalogFunction function,
boolean ignoreIfExists) |
void |
createPartition(org.apache.flink.table.catalog.ObjectPath tablePath,
org.apache.flink.table.catalog.CatalogPartitionSpec partitionSpec,
org.apache.flink.table.catalog.CatalogPartition partition,
boolean ignoreIfExists) |
void |
createTable(org.apache.flink.table.catalog.ObjectPath tablePath,
org.apache.flink.table.catalog.CatalogBaseTable table,
boolean ignoreIfExists) |
boolean |
databaseExists(java.lang.String databaseName) |
void |
dropDatabase(java.lang.String name,
boolean ignoreIfNotExists,
boolean cascade) |
void |
dropFunction(org.apache.flink.table.catalog.ObjectPath functionPath,
boolean ignoreIfNotExists) |
void |
dropPartition(org.apache.flink.table.catalog.ObjectPath tablePath,
org.apache.flink.table.catalog.CatalogPartitionSpec partitionSpec,
boolean ignoreIfNotExists) |
void |
dropTable(org.apache.flink.table.catalog.ObjectPath tablePath,
boolean ignoreIfNotExists) |
boolean |
functionExists(org.apache.flink.table.catalog.ObjectPath functionPath) |
org.apache.flink.table.catalog.CatalogDatabase |
getDatabase(java.lang.String databaseName) |
java.util.Optional<org.apache.flink.table.factories.Factory> |
getFactory() |
org.apache.flink.table.catalog.CatalogFunction |
getFunction(org.apache.flink.table.catalog.ObjectPath functionPath) |
org.apache.flink.table.catalog.CatalogPartition |
getPartition(org.apache.flink.table.catalog.ObjectPath tablePath,
org.apache.flink.table.catalog.CatalogPartitionSpec partitionSpec) |
org.apache.flink.table.catalog.stats.CatalogColumnStatistics |
getPartitionColumnStatistics(org.apache.flink.table.catalog.ObjectPath tablePath,
org.apache.flink.table.catalog.CatalogPartitionSpec partitionSpec) |
org.apache.flink.table.catalog.stats.CatalogTableStatistics |
getPartitionStatistics(org.apache.flink.table.catalog.ObjectPath tablePath,
org.apache.flink.table.catalog.CatalogPartitionSpec partitionSpec) |
org.apache.flink.table.catalog.CatalogTable |
getTable(org.apache.flink.table.catalog.ObjectPath tablePath) |
org.apache.flink.table.catalog.stats.CatalogColumnStatistics |
getTableColumnStatistics(org.apache.flink.table.catalog.ObjectPath tablePath) |
org.apache.flink.table.catalog.stats.CatalogTableStatistics |
getTableStatistics(org.apache.flink.table.catalog.ObjectPath tablePath) |
java.util.List<java.lang.String> |
listDatabases() |
java.util.List<java.lang.String> |
listFunctions(java.lang.String dbName) |
java.util.List<org.apache.flink.table.catalog.CatalogPartitionSpec> |
listPartitions(org.apache.flink.table.catalog.ObjectPath tablePath) |
java.util.List<org.apache.flink.table.catalog.CatalogPartitionSpec> |
listPartitions(org.apache.flink.table.catalog.ObjectPath tablePath,
org.apache.flink.table.catalog.CatalogPartitionSpec partitionSpec) |
java.util.List<org.apache.flink.table.catalog.CatalogPartitionSpec> |
listPartitionsByFilter(org.apache.flink.table.catalog.ObjectPath tablePath,
java.util.List<org.apache.flink.table.expressions.Expression> filters) |
java.util.List<java.lang.String> |
listTables(java.lang.String databaseName) |
java.util.List<java.lang.String> |
listViews(java.lang.String databaseName) |
void |
open() |
boolean |
partitionExists(org.apache.flink.table.catalog.ObjectPath tablePath,
org.apache.flink.table.catalog.CatalogPartitionSpec partitionSpec) |
void |
renameTable(org.apache.flink.table.catalog.ObjectPath tablePath,
java.lang.String newTableName,
boolean ignoreIfNotExists) |
boolean |
tableExists(org.apache.flink.table.catalog.ObjectPath tablePath) |
getDefaultDatabase, getNamepublic FlinkCatalog(java.lang.String catalogName,
java.lang.String defaultDatabase,
Namespace baseNamespace,
CatalogLoader catalogLoader,
boolean cacheEnabled,
long cacheExpirationIntervalMs)
public void open()
throws org.apache.flink.table.catalog.exceptions.CatalogException
org.apache.flink.table.catalog.exceptions.CatalogExceptionpublic void close()
throws org.apache.flink.table.catalog.exceptions.CatalogException
org.apache.flink.table.catalog.exceptions.CatalogExceptionpublic Catalog catalog()
public java.util.List<java.lang.String> listDatabases()
throws org.apache.flink.table.catalog.exceptions.CatalogException
org.apache.flink.table.catalog.exceptions.CatalogExceptionpublic org.apache.flink.table.catalog.CatalogDatabase getDatabase(java.lang.String databaseName)
throws org.apache.flink.table.catalog.exceptions.DatabaseNotExistException,
org.apache.flink.table.catalog.exceptions.CatalogException
org.apache.flink.table.catalog.exceptions.DatabaseNotExistExceptionorg.apache.flink.table.catalog.exceptions.CatalogExceptionpublic boolean databaseExists(java.lang.String databaseName)
throws org.apache.flink.table.catalog.exceptions.CatalogException
org.apache.flink.table.catalog.exceptions.CatalogExceptionpublic void createDatabase(java.lang.String name,
org.apache.flink.table.catalog.CatalogDatabase database,
boolean ignoreIfExists)
throws org.apache.flink.table.catalog.exceptions.DatabaseAlreadyExistException,
org.apache.flink.table.catalog.exceptions.CatalogException
org.apache.flink.table.catalog.exceptions.DatabaseAlreadyExistExceptionorg.apache.flink.table.catalog.exceptions.CatalogExceptionpublic void dropDatabase(java.lang.String name,
boolean ignoreIfNotExists,
boolean cascade)
throws org.apache.flink.table.catalog.exceptions.DatabaseNotExistException,
org.apache.flink.table.catalog.exceptions.DatabaseNotEmptyException,
org.apache.flink.table.catalog.exceptions.CatalogException
org.apache.flink.table.catalog.exceptions.DatabaseNotExistExceptionorg.apache.flink.table.catalog.exceptions.DatabaseNotEmptyExceptionorg.apache.flink.table.catalog.exceptions.CatalogExceptionpublic void alterDatabase(java.lang.String name,
org.apache.flink.table.catalog.CatalogDatabase newDatabase,
boolean ignoreIfNotExists)
throws org.apache.flink.table.catalog.exceptions.DatabaseNotExistException,
org.apache.flink.table.catalog.exceptions.CatalogException
org.apache.flink.table.catalog.exceptions.DatabaseNotExistExceptionorg.apache.flink.table.catalog.exceptions.CatalogExceptionpublic java.util.List<java.lang.String> listTables(java.lang.String databaseName)
throws org.apache.flink.table.catalog.exceptions.DatabaseNotExistException,
org.apache.flink.table.catalog.exceptions.CatalogException
org.apache.flink.table.catalog.exceptions.DatabaseNotExistExceptionorg.apache.flink.table.catalog.exceptions.CatalogExceptionpublic org.apache.flink.table.catalog.CatalogTable getTable(org.apache.flink.table.catalog.ObjectPath tablePath)
throws org.apache.flink.table.catalog.exceptions.TableNotExistException,
org.apache.flink.table.catalog.exceptions.CatalogException
org.apache.flink.table.catalog.exceptions.TableNotExistExceptionorg.apache.flink.table.catalog.exceptions.CatalogExceptionpublic boolean tableExists(org.apache.flink.table.catalog.ObjectPath tablePath)
throws org.apache.flink.table.catalog.exceptions.CatalogException
org.apache.flink.table.catalog.exceptions.CatalogExceptionpublic void dropTable(org.apache.flink.table.catalog.ObjectPath tablePath,
boolean ignoreIfNotExists)
throws org.apache.flink.table.catalog.exceptions.TableNotExistException,
org.apache.flink.table.catalog.exceptions.CatalogException
org.apache.flink.table.catalog.exceptions.TableNotExistExceptionorg.apache.flink.table.catalog.exceptions.CatalogExceptionpublic void renameTable(org.apache.flink.table.catalog.ObjectPath tablePath,
java.lang.String newTableName,
boolean ignoreIfNotExists)
throws org.apache.flink.table.catalog.exceptions.TableNotExistException,
org.apache.flink.table.catalog.exceptions.TableAlreadyExistException,
org.apache.flink.table.catalog.exceptions.CatalogException
org.apache.flink.table.catalog.exceptions.TableNotExistExceptionorg.apache.flink.table.catalog.exceptions.TableAlreadyExistExceptionorg.apache.flink.table.catalog.exceptions.CatalogExceptionpublic void createTable(org.apache.flink.table.catalog.ObjectPath tablePath,
org.apache.flink.table.catalog.CatalogBaseTable table,
boolean ignoreIfExists)
throws org.apache.flink.table.catalog.exceptions.CatalogException,
org.apache.flink.table.catalog.exceptions.TableAlreadyExistException
org.apache.flink.table.catalog.exceptions.CatalogExceptionorg.apache.flink.table.catalog.exceptions.TableAlreadyExistExceptionpublic void alterTable(org.apache.flink.table.catalog.ObjectPath tablePath,
org.apache.flink.table.catalog.CatalogBaseTable newTable,
boolean ignoreIfNotExists)
throws org.apache.flink.table.catalog.exceptions.CatalogException,
org.apache.flink.table.catalog.exceptions.TableNotExistException
org.apache.flink.table.catalog.exceptions.CatalogExceptionorg.apache.flink.table.catalog.exceptions.TableNotExistExceptionpublic java.util.Optional<org.apache.flink.table.factories.Factory> getFactory()
public java.util.List<java.lang.String> listViews(java.lang.String databaseName)
throws org.apache.flink.table.catalog.exceptions.CatalogException
org.apache.flink.table.catalog.exceptions.CatalogExceptionpublic org.apache.flink.table.catalog.CatalogPartition getPartition(org.apache.flink.table.catalog.ObjectPath tablePath,
org.apache.flink.table.catalog.CatalogPartitionSpec partitionSpec)
throws org.apache.flink.table.catalog.exceptions.CatalogException
org.apache.flink.table.catalog.exceptions.CatalogExceptionpublic boolean partitionExists(org.apache.flink.table.catalog.ObjectPath tablePath,
org.apache.flink.table.catalog.CatalogPartitionSpec partitionSpec)
throws org.apache.flink.table.catalog.exceptions.CatalogException
org.apache.flink.table.catalog.exceptions.CatalogExceptionpublic void createPartition(org.apache.flink.table.catalog.ObjectPath tablePath,
org.apache.flink.table.catalog.CatalogPartitionSpec partitionSpec,
org.apache.flink.table.catalog.CatalogPartition partition,
boolean ignoreIfExists)
throws org.apache.flink.table.catalog.exceptions.CatalogException
org.apache.flink.table.catalog.exceptions.CatalogExceptionpublic void dropPartition(org.apache.flink.table.catalog.ObjectPath tablePath,
org.apache.flink.table.catalog.CatalogPartitionSpec partitionSpec,
boolean ignoreIfNotExists)
throws org.apache.flink.table.catalog.exceptions.CatalogException
org.apache.flink.table.catalog.exceptions.CatalogExceptionpublic void alterPartition(org.apache.flink.table.catalog.ObjectPath tablePath,
org.apache.flink.table.catalog.CatalogPartitionSpec partitionSpec,
org.apache.flink.table.catalog.CatalogPartition newPartition,
boolean ignoreIfNotExists)
throws org.apache.flink.table.catalog.exceptions.CatalogException
org.apache.flink.table.catalog.exceptions.CatalogExceptionpublic java.util.List<java.lang.String> listFunctions(java.lang.String dbName)
throws org.apache.flink.table.catalog.exceptions.CatalogException
org.apache.flink.table.catalog.exceptions.CatalogExceptionpublic org.apache.flink.table.catalog.CatalogFunction getFunction(org.apache.flink.table.catalog.ObjectPath functionPath)
throws org.apache.flink.table.catalog.exceptions.FunctionNotExistException,
org.apache.flink.table.catalog.exceptions.CatalogException
org.apache.flink.table.catalog.exceptions.FunctionNotExistExceptionorg.apache.flink.table.catalog.exceptions.CatalogExceptionpublic boolean functionExists(org.apache.flink.table.catalog.ObjectPath functionPath)
throws org.apache.flink.table.catalog.exceptions.CatalogException
org.apache.flink.table.catalog.exceptions.CatalogExceptionpublic void createFunction(org.apache.flink.table.catalog.ObjectPath functionPath,
org.apache.flink.table.catalog.CatalogFunction function,
boolean ignoreIfExists)
throws org.apache.flink.table.catalog.exceptions.CatalogException
org.apache.flink.table.catalog.exceptions.CatalogExceptionpublic void alterFunction(org.apache.flink.table.catalog.ObjectPath functionPath,
org.apache.flink.table.catalog.CatalogFunction newFunction,
boolean ignoreIfNotExists)
throws org.apache.flink.table.catalog.exceptions.CatalogException
org.apache.flink.table.catalog.exceptions.CatalogExceptionpublic void dropFunction(org.apache.flink.table.catalog.ObjectPath functionPath,
boolean ignoreIfNotExists)
throws org.apache.flink.table.catalog.exceptions.CatalogException
org.apache.flink.table.catalog.exceptions.CatalogExceptionpublic void alterTableStatistics(org.apache.flink.table.catalog.ObjectPath tablePath,
org.apache.flink.table.catalog.stats.CatalogTableStatistics tableStatistics,
boolean ignoreIfNotExists)
throws org.apache.flink.table.catalog.exceptions.CatalogException
org.apache.flink.table.catalog.exceptions.CatalogExceptionpublic void alterTableColumnStatistics(org.apache.flink.table.catalog.ObjectPath tablePath,
org.apache.flink.table.catalog.stats.CatalogColumnStatistics columnStatistics,
boolean ignoreIfNotExists)
throws org.apache.flink.table.catalog.exceptions.CatalogException
org.apache.flink.table.catalog.exceptions.CatalogExceptionpublic void alterPartitionStatistics(org.apache.flink.table.catalog.ObjectPath tablePath,
org.apache.flink.table.catalog.CatalogPartitionSpec partitionSpec,
org.apache.flink.table.catalog.stats.CatalogTableStatistics partitionStatistics,
boolean ignoreIfNotExists)
throws org.apache.flink.table.catalog.exceptions.CatalogException
org.apache.flink.table.catalog.exceptions.CatalogExceptionpublic void alterPartitionColumnStatistics(org.apache.flink.table.catalog.ObjectPath tablePath,
org.apache.flink.table.catalog.CatalogPartitionSpec partitionSpec,
org.apache.flink.table.catalog.stats.CatalogColumnStatistics columnStatistics,
boolean ignoreIfNotExists)
throws org.apache.flink.table.catalog.exceptions.CatalogException
org.apache.flink.table.catalog.exceptions.CatalogExceptionpublic java.util.List<org.apache.flink.table.catalog.CatalogPartitionSpec> listPartitions(org.apache.flink.table.catalog.ObjectPath tablePath)
throws org.apache.flink.table.catalog.exceptions.TableNotExistException,
org.apache.flink.table.catalog.exceptions.TableNotPartitionedException,
org.apache.flink.table.catalog.exceptions.CatalogException
org.apache.flink.table.catalog.exceptions.TableNotExistExceptionorg.apache.flink.table.catalog.exceptions.TableNotPartitionedExceptionorg.apache.flink.table.catalog.exceptions.CatalogExceptionpublic java.util.List<org.apache.flink.table.catalog.CatalogPartitionSpec> listPartitions(org.apache.flink.table.catalog.ObjectPath tablePath,
org.apache.flink.table.catalog.CatalogPartitionSpec partitionSpec)
throws org.apache.flink.table.catalog.exceptions.CatalogException
org.apache.flink.table.catalog.exceptions.CatalogExceptionpublic java.util.List<org.apache.flink.table.catalog.CatalogPartitionSpec> listPartitionsByFilter(org.apache.flink.table.catalog.ObjectPath tablePath,
java.util.List<org.apache.flink.table.expressions.Expression> filters)
throws org.apache.flink.table.catalog.exceptions.CatalogException
org.apache.flink.table.catalog.exceptions.CatalogExceptionpublic org.apache.flink.table.catalog.stats.CatalogTableStatistics getTableStatistics(org.apache.flink.table.catalog.ObjectPath tablePath)
throws org.apache.flink.table.catalog.exceptions.CatalogException
org.apache.flink.table.catalog.exceptions.CatalogExceptionpublic org.apache.flink.table.catalog.stats.CatalogColumnStatistics getTableColumnStatistics(org.apache.flink.table.catalog.ObjectPath tablePath)
throws org.apache.flink.table.catalog.exceptions.CatalogException
org.apache.flink.table.catalog.exceptions.CatalogExceptionpublic org.apache.flink.table.catalog.stats.CatalogTableStatistics getPartitionStatistics(org.apache.flink.table.catalog.ObjectPath tablePath,
org.apache.flink.table.catalog.CatalogPartitionSpec partitionSpec)
throws org.apache.flink.table.catalog.exceptions.CatalogException
org.apache.flink.table.catalog.exceptions.CatalogExceptionpublic org.apache.flink.table.catalog.stats.CatalogColumnStatistics getPartitionColumnStatistics(org.apache.flink.table.catalog.ObjectPath tablePath,
org.apache.flink.table.catalog.CatalogPartitionSpec partitionSpec)
throws org.apache.flink.table.catalog.exceptions.CatalogException
org.apache.flink.table.catalog.exceptions.CatalogException