Class FlinkCatalogFactory

  • All Implemented Interfaces:
    org.apache.flink.table.factories.CatalogFactory, 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 creates FlinkCatalog.

    This supports the following catalog configuration options:

    • type - Flink catalog factory key, should be "iceberg"
    • catalog-type - iceberg catalog type, "hive" or "hadoop"
    • 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 default
    • base-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).

    • Constructor Detail

      • FlinkCatalogFactory

        public FlinkCatalogFactory()
    • Method Detail

      • createCatalogLoader

        protected CatalogLoader createCatalogLoader​(java.lang.String name,
                                                    java.util.Map<java.lang.String,​java.lang.String> properties,
                                                    org.apache.hadoop.conf.Configuration hadoopConf)
        Create an Iceberg Catalog loader to be used by this Flink catalog adapter.
        Parameters:
        name - Flink's catalog name
        properties - Flink's catalog properties
        hadoopConf - Hadoop configuration for catalog
        Returns:
        an Iceberg catalog loader
      • requiredContext

        public java.util.Map<java.lang.String,​java.lang.String> requiredContext()
        Specified by:
        requiredContext in interface org.apache.flink.table.factories.TableFactory
      • supportedProperties

        public java.util.List<java.lang.String> supportedProperties()
        Specified by:
        supportedProperties in interface org.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 interface org.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()