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
,org.apache.flink.table.factories.TableFactory
public class FlinkCatalogFactory extends java.lang.Object implements org.apache.flink.table.factories.CatalogFactory
A Flink Catalog factory implementation that createsFlinkCatalog
.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)
.
-
-
Field Summary
Fields Modifier and Type Field Description static java.lang.String
BASE_NAMESPACE
static java.lang.String
DEFAULT_DATABASE
static java.lang.String
DEFAULT_DATABASE_NAME
static java.lang.String
HADOOP_CONF_DIR
static java.lang.String
HIVE_CONF_DIR
static java.lang.String
ICEBERG_CATALOG_TYPE
static java.lang.String
ICEBERG_CATALOG_TYPE_HADOOP
static java.lang.String
ICEBERG_CATALOG_TYPE_HIVE
static java.lang.String
ICEBERG_CATALOG_TYPE_REST
static java.lang.String
PROPERTY_VERSION
static java.lang.String
TYPE
-
Constructor Summary
Constructors Constructor Description FlinkCatalogFactory()
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method Description static org.apache.hadoop.conf.Configuration
clusterHadoopConf()
org.apache.flink.table.catalog.Catalog
createCatalog(java.lang.String name, java.util.Map<java.lang.String,java.lang.String> properties)
protected org.apache.flink.table.catalog.Catalog
createCatalog(java.lang.String name, java.util.Map<java.lang.String,java.lang.String> properties, org.apache.hadoop.conf.Configuration hadoopConf)
java.util.Map<java.lang.String,java.lang.String>
requiredContext()
java.util.List<java.lang.String>
supportedProperties()
-
-
-
Field Detail
-
ICEBERG_CATALOG_TYPE
public static final java.lang.String ICEBERG_CATALOG_TYPE
- See Also:
- Constant Field Values
-
ICEBERG_CATALOG_TYPE_HADOOP
public static final java.lang.String ICEBERG_CATALOG_TYPE_HADOOP
- See Also:
- Constant Field Values
-
ICEBERG_CATALOG_TYPE_HIVE
public static final java.lang.String ICEBERG_CATALOG_TYPE_HIVE
- See Also:
- Constant Field Values
-
ICEBERG_CATALOG_TYPE_REST
public static final java.lang.String ICEBERG_CATALOG_TYPE_REST
- See Also:
- Constant Field Values
-
HIVE_CONF_DIR
public static final java.lang.String HIVE_CONF_DIR
- See Also:
- Constant Field Values
-
HADOOP_CONF_DIR
public static final java.lang.String HADOOP_CONF_DIR
- See Also:
- Constant Field Values
-
DEFAULT_DATABASE
public static final java.lang.String DEFAULT_DATABASE
- See Also:
- Constant Field Values
-
DEFAULT_DATABASE_NAME
public static final java.lang.String DEFAULT_DATABASE_NAME
- See Also:
- Constant Field Values
-
BASE_NAMESPACE
public static final java.lang.String BASE_NAMESPACE
- See Also:
- Constant Field Values
-
TYPE
public static final java.lang.String TYPE
- See Also:
- Constant Field Values
-
PROPERTY_VERSION
public static final java.lang.String PROPERTY_VERSION
- See Also:
- Constant Field Values
-
-
Method Detail
-
requiredContext
public java.util.Map<java.lang.String,java.lang.String> requiredContext()
- Specified by:
requiredContext
in interfaceorg.apache.flink.table.factories.CatalogFactory
- Specified by:
requiredContext
in interfaceorg.apache.flink.table.factories.TableFactory
-
supportedProperties
public java.util.List<java.lang.String> supportedProperties()
- Specified by:
supportedProperties
in interfaceorg.apache.flink.table.factories.CatalogFactory
- Specified by:
supportedProperties
in interfaceorg.apache.flink.table.factories.TableFactory
-
createCatalog
public org.apache.flink.table.catalog.Catalog createCatalog(java.lang.String name, java.util.Map<java.lang.String,java.lang.String> properties)
- Specified by:
createCatalog
in interfaceorg.apache.flink.table.factories.CatalogFactory
-
createCatalog
protected org.apache.flink.table.catalog.Catalog createCatalog(java.lang.String name, java.util.Map<java.lang.String,java.lang.String> properties, org.apache.hadoop.conf.Configuration hadoopConf)
-
clusterHadoopConf
public static org.apache.hadoop.conf.Configuration clusterHadoopConf()
-
-