Package org.apache.flink.table.factories
Class TableFactoryUtil
java.lang.Object
org.apache.flink.table.factories.TableFactoryUtil
Utility for dealing with
TableFactory using the TableFactoryService.-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionstatic org.apache.flink.table.factories.CatalogStoreFactory.ContextbuildCatalogStoreFactoryContext(org.apache.flink.configuration.Configuration configuration, ClassLoader classLoader) Build aCatalogStoreFactory.Contextfor opening theCatalogStoreFactory.static org.apache.flink.table.factories.CatalogStoreFactoryfindAndCreateCatalogStoreFactory(org.apache.flink.configuration.Configuration configuration, ClassLoader classLoader) Finds and creates aCatalogStoreFactoryusing the providedConfigurationand user classloader.static <T> org.apache.flink.table.legacy.sinks.TableSink<T>findAndCreateTableSink(org.apache.flink.table.catalog.ObjectIdentifier objectIdentifier, org.apache.flink.table.catalog.CatalogTable catalogTable, org.apache.flink.configuration.ReadableConfig configuration, boolean isStreamingMode, boolean isTemporary) Creates aTableSinkfrom aCatalogTable.static <T> org.apache.flink.table.legacy.sinks.TableSink<T>findAndCreateTableSink(org.apache.flink.table.legacy.factories.TableSinkFactory.Context context) Returns a table sink matching the context.static <T> org.apache.flink.table.legacy.sources.TableSource<T>findAndCreateTableSource(org.apache.flink.table.catalog.ObjectIdentifier objectIdentifier, org.apache.flink.table.catalog.CatalogTable catalogTable, org.apache.flink.configuration.ReadableConfig configuration, boolean isTemporary) Creates aTableSourcefrom aCatalogTable.static <T> org.apache.flink.table.legacy.sources.TableSource<T>findAndCreateTableSource(org.apache.flink.table.legacy.factories.TableSourceFactory.Context context) Returns a table source matching the descriptor.static List<CatalogModificationListener>findCatalogModificationListenerList(org.apache.flink.configuration.ReadableConfig configuration, ClassLoader classLoader) Find and create modification listener list from configuration.static booleanisLegacyConnectorOptions(org.apache.flink.configuration.ReadableConfig configuration, boolean isStreamingMode, org.apache.flink.table.catalog.ObjectIdentifier objectIdentifier, org.apache.flink.table.catalog.CatalogTable catalogTable, boolean isTemporary) Checks whether theCatalogTableuses legacy connector sink options.
-
Constructor Details
-
TableFactoryUtil
public TableFactoryUtil()
-
-
Method Details
-
findAndCreateTableSource
public static <T> org.apache.flink.table.legacy.sources.TableSource<T> findAndCreateTableSource(org.apache.flink.table.legacy.factories.TableSourceFactory.Context context) Returns a table source matching the descriptor. -
findAndCreateTableSource
public static <T> org.apache.flink.table.legacy.sources.TableSource<T> findAndCreateTableSource(org.apache.flink.table.catalog.ObjectIdentifier objectIdentifier, org.apache.flink.table.catalog.CatalogTable catalogTable, org.apache.flink.configuration.ReadableConfig configuration, boolean isTemporary) Creates aTableSourcefrom aCatalogTable.It considers
Catalog.getFactory()if provided. -
findAndCreateTableSink
public static <T> org.apache.flink.table.legacy.sinks.TableSink<T> findAndCreateTableSink(org.apache.flink.table.legacy.factories.TableSinkFactory.Context context) Returns a table sink matching the context. -
findAndCreateTableSink
public static <T> org.apache.flink.table.legacy.sinks.TableSink<T> findAndCreateTableSink(org.apache.flink.table.catalog.ObjectIdentifier objectIdentifier, org.apache.flink.table.catalog.CatalogTable catalogTable, org.apache.flink.configuration.ReadableConfig configuration, boolean isStreamingMode, boolean isTemporary) Creates aTableSinkfrom aCatalogTable.It considers
Catalog.getFactory()if provided. -
isLegacyConnectorOptions
public static boolean isLegacyConnectorOptions(org.apache.flink.configuration.ReadableConfig configuration, boolean isStreamingMode, org.apache.flink.table.catalog.ObjectIdentifier objectIdentifier, org.apache.flink.table.catalog.CatalogTable catalogTable, boolean isTemporary) Checks whether theCatalogTableuses legacy connector sink options. -
findCatalogModificationListenerList
public static List<CatalogModificationListener> findCatalogModificationListenerList(org.apache.flink.configuration.ReadableConfig configuration, ClassLoader classLoader) Find and create modification listener list from configuration. -
findAndCreateCatalogStoreFactory
public static org.apache.flink.table.factories.CatalogStoreFactory findAndCreateCatalogStoreFactory(org.apache.flink.configuration.Configuration configuration, ClassLoader classLoader) Finds and creates aCatalogStoreFactoryusing the providedConfigurationand user classloader.The configuration format should be as follows:
table.catalog-store.kind: {identifier} table.catalog-store.{identifier}.{param1}: xxx table.catalog-store.{identifier}.{param2}: xxx -
buildCatalogStoreFactoryContext
public static org.apache.flink.table.factories.CatalogStoreFactory.Context buildCatalogStoreFactoryContext(org.apache.flink.configuration.Configuration configuration, ClassLoader classLoader) Build aCatalogStoreFactory.Contextfor opening theCatalogStoreFactory.The configuration format should be as follows:
table.catalog-store.kind: {identifier} table.catalog-store.{identifier}.{param1}: xxx table.catalog-store.{identifier}.{param2}: xxx
-