Interface Factory
-
- All Known Subinterfaces:
BulkReaderFormatFactory
,BulkWriterFormatFactory
,CatalogFactory
,CatalogModificationListenerFactory
,CatalogStoreFactory
,DecodingFormatFactory<I>
,DeserializationFormatFactory
,DynamicTableFactory
,DynamicTableSinkFactory
,DynamicTableSourceFactory
,EncodingFormatFactory<I>
,ExecutorFactory
,FormatFactory
,ManagedTableFactory
,ModuleFactory
,ParserFactory
,PlannerFactory
,SerializationFormatFactory
,SqlGatewayEndpointFactory
,StreamExecutorFactory
,WorkflowSchedulerFactory
- All Known Implementing Classes:
AsyncDynamicTableSinkFactory
,AvroFileFormatFactory
,AvroFormatFactory
,BlackHoleTableSinkFactory
,CanalJsonFormatFactory
,ChangelogCsvFormatFactory
,CoreModuleFactory
,CsvFileFormatFactory
,CsvFormatFactory
,DataGenTableSourceFactory
,DebeziumAvroFormatFactory
,DebeziumJsonFormatFactory
,DefaultExecutorFactory
,DefaultParserFactory
,DefaultPlannerFactory
,DelegateExecutorFactory
,DelegatePlannerFactory
,EmbeddedWorkflowSchedulerFactory
,FileCatalogStoreFactory
,FileSystemTableFactory
,GenericInMemoryCatalogFactory
,GenericInMemoryCatalogStoreFactory
,JsonFormatFactory
,MaxwellJsonFormatFactory
,OggJsonFormatFactory
,OrcFileFormatFactory
,ParquetFileFormatFactory
,PbFileFormatFactory
,PbFormatFactory
,PrintTableSinkFactory
,PythonDynamicTableFactory
,RawFormatFactory
,RegistryAvroFormatFactory
,SocketDynamicTableFactory
,SqlGatewayRestEndpointFactory
,TestFileSystemCatalogFactory
,TestFileSystemTableFactory
,TestScanTableSourceWithWatermarkPushDownFactory
,UpsertTestDynamicTableSinkFactory
@PublicEvolving public interface Factory
Base interface for all kind of factories that create object instances from a list of key-value pairs in Flink's Table & SQL API.A factory is uniquely identified by
Class
andfactoryIdentifier()
.The list of available factories is discovered using Java's Service Provider Interfaces (SPI). Classes that implement this interface can be added to
META_INF/services/org.apache.flink.table.factories.Factory
in JAR files.Every factory declares a set of required and optional options. This information will not be used during discovery but is helpful when generating documentation and performing validation. A factory may discover further (nested) factories, the options of the nested factories must not be declared in the sets of this factory.
It is the responsibility of each factory to perform validation before returning an instance.
For consistency, the following style for key names of
ConfigOption
is recommended:- Try to reuse key names as much as possible. Use other factory implementations as an example.
- Key names should be declared in lower case. Use "-" instead of dots or camel case to split words.
- Key names should be hierarchical where appropriate. Think about how one would define
such a hierarchy in JSON or YAML file (e.g.
sink.bulk-flush.max-actions
). - In case of a hierarchy, try not to use the higher level again in the key name (e.g. do
sink.partitioner
instead ofsink.sink-partitioner
) to keep the keys short. - Key names which can be templated, e.g. to refer to a specific column, should be listed
using '#' as the placeholder symbol. For example, use
fields.#.min
.
-
-
Method Summary
All Methods Instance Methods Abstract Methods Modifier and Type Method Description String
factoryIdentifier()
Returns a unique identifier among same factory interfaces.Set<ConfigOption<?>>
optionalOptions()
Returns a set ofConfigOption
that an implementation of this factory consumes in addition torequiredOptions()
.Set<ConfigOption<?>>
requiredOptions()
Returns a set ofConfigOption
that an implementation of this factory requires in addition tooptionalOptions()
.
-
-
-
Method Detail
-
factoryIdentifier
String factoryIdentifier()
Returns a unique identifier among same factory interfaces.For consistency, an identifier should be declared as one lower case word (e.g.
kafka
). If multiple factories exist for different versions, a version should be appended using "-" (e.g.elasticsearch-7
).
-
requiredOptions
Set<ConfigOption<?>> requiredOptions()
Returns a set ofConfigOption
that an implementation of this factory requires in addition tooptionalOptions()
.See the documentation of
Factory
for more information.
-
optionalOptions
Set<ConfigOption<?>> optionalOptions()
Returns a set ofConfigOption
that an implementation of this factory consumes in addition torequiredOptions()
.See the documentation of
Factory
for more information.
-
-