Package org.apache.iceberg.flink
Class FlinkCatalogFactory
java.lang.Object
org.apache.iceberg.flink.FlinkCatalogFactory
- All Implemented Interfaces:
org.apache.flink.table.factories.CatalogFactory,org.apache.flink.table.factories.Factory
public class FlinkCatalogFactory
extends Object
implements org.apache.flink.table.factories.CatalogFactory
A Flink Catalog factory implementation that creates
FlinkCatalog.
This supports the following catalog configuration options:
type- Flink catalog factory key, should be "iceberg"catalog-type- iceberg catalog type, "hive", "hadoop" or "rest"uri- the Hive Metastore URI (Hive catalog only)clients- the Hive Client Pool Size (Hive catalog only)warehouse- the warehouse path (Hadoop catalog only)default-database- a database name to use as the defaultbase-namespace- a base namespace as the prefix for all databases (Hadoop catalog only)cache-enabled- whether to enable catalog cache
To use a custom catalog that is not a Hive or Hadoop catalog, extend this class and override
createCatalogLoader(String, Map, Configuration).
-
Nested Class Summary
Nested classes/interfaces inherited from interface org.apache.flink.table.factories.CatalogFactory
org.apache.flink.table.factories.CatalogFactory.Context -
Field Summary
Fields -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionstatic org.apache.hadoop.conf.Configurationprotected org.apache.flink.table.catalog.CatalogcreateCatalog(String name, Map<String, String> properties, org.apache.hadoop.conf.Configuration hadoopConf) org.apache.flink.table.catalog.CatalogcreateCatalog(org.apache.flink.table.factories.CatalogFactory.Context context) Set<org.apache.flink.configuration.ConfigOption<?>> Set<org.apache.flink.configuration.ConfigOption<?>>
-
Field Details
-
FACTORY_IDENTIFIER
- See Also:
-
ICEBERG_CATALOG_TYPE
- See Also:
-
ICEBERG_CATALOG_TYPE_HADOOP
- See Also:
-
ICEBERG_CATALOG_TYPE_HIVE
- See Also:
-
ICEBERG_CATALOG_TYPE_REST
- See Also:
-
HIVE_CONF_DIR
- See Also:
-
HADOOP_CONF_DIR
- See Also:
-
DEFAULT_DATABASE
- See Also:
-
DEFAULT_DATABASE_NAME
- See Also:
-
DEFAULT_CATALOG_NAME
- See Also:
-
BASE_NAMESPACE
- See Also:
-
-
Constructor Details
-
FlinkCatalogFactory
public FlinkCatalogFactory()
-
-
Method Details
-
factoryIdentifier
- Specified by:
factoryIdentifierin interfaceorg.apache.flink.table.factories.Factory
-
requiredOptions
- Specified by:
requiredOptionsin interfaceorg.apache.flink.table.factories.Factory
-
optionalOptions
- Specified by:
optionalOptionsin interfaceorg.apache.flink.table.factories.Factory
-
createCatalog
public org.apache.flink.table.catalog.Catalog createCatalog(org.apache.flink.table.factories.CatalogFactory.Context context) - Specified by:
createCatalogin interfaceorg.apache.flink.table.factories.CatalogFactory
-
createCatalog
-
clusterHadoopConf
public static org.apache.hadoop.conf.Configuration clusterHadoopConf()
-