@Internal public class KafkaDynamicTableFactory extends Object implements DynamicTableSourceFactory, DynamicTableSinkFactory
KafkaDynamicSource
and KafkaDynamicSink
.DynamicTableFactory.Context
Modifier and Type | Field and Description |
---|---|
static String |
IDENTIFIER |
Constructor and Description |
---|
KafkaDynamicTableFactory() |
Modifier and Type | Method and Description |
---|---|
DynamicTableSink |
createDynamicTableSink(DynamicTableFactory.Context context)
Creates a
DynamicTableSink instance from a CatalogTable and additional
context information. |
DynamicTableSource |
createDynamicTableSource(DynamicTableFactory.Context context)
Creates a
DynamicTableSource instance from a CatalogTable and additional
context information. |
protected KafkaDynamicSink |
createKafkaTableSink(DataType physicalDataType,
EncodingFormat<SerializationSchema<RowData>> keyEncodingFormat,
EncodingFormat<SerializationSchema<RowData>> valueEncodingFormat,
int[] keyProjection,
int[] valueProjection,
String keyPrefix,
String topic,
Properties properties,
FlinkKafkaPartitioner<RowData> partitioner,
DeliveryGuarantee deliveryGuarantee,
Integer parallelism,
String transactionalIdPrefix) |
protected KafkaDynamicSource |
createKafkaTableSource(DataType physicalDataType,
DecodingFormat<DeserializationSchema<RowData>> keyDecodingFormat,
DecodingFormat<DeserializationSchema<RowData>> valueDecodingFormat,
int[] keyProjection,
int[] valueProjection,
String keyPrefix,
List<String> topics,
Pattern topicPattern,
Properties properties,
StartupMode startupMode,
Map<KafkaTopicPartition,Long> specificStartupOffsets,
long startupTimestampMillis,
BoundedMode boundedMode,
Map<KafkaTopicPartition,Long> specificEndOffsets,
long endTimestampMillis,
String tableIdentifier) |
String |
factoryIdentifier()
Returns a unique identifier among same factory interfaces.
|
Set<ConfigOption<?>> |
forwardOptions()
Returns a set of
ConfigOption that are directly forwarded to the runtime
implementation but don't affect the final execution topology. |
Set<ConfigOption<?>> |
optionalOptions()
Returns a set of
ConfigOption that an implementation of this factory consumes in
addition to Factory.requiredOptions() . |
Set<ConfigOption<?>> |
requiredOptions()
Returns a set of
ConfigOption that an implementation of this factory requires in
addition to Factory.optionalOptions() . |
public static final String IDENTIFIER
public String factoryIdentifier()
Factory
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
).
factoryIdentifier
in interface Factory
public Set<ConfigOption<?>> requiredOptions()
Factory
ConfigOption
that an implementation of this factory requires in
addition to Factory.optionalOptions()
.
See the documentation of Factory
for more information.
requiredOptions
in interface Factory
public Set<ConfigOption<?>> optionalOptions()
Factory
ConfigOption
that an implementation of this factory consumes in
addition to Factory.requiredOptions()
.
See the documentation of Factory
for more information.
optionalOptions
in interface Factory
public Set<ConfigOption<?>> forwardOptions()
DynamicTableFactory
ConfigOption
that are directly forwarded to the runtime
implementation but don't affect the final execution topology.
Options declared here can override options of the persisted plan during an enrichment
phase. Since a restored topology is static, an implementer has to ensure that the declared
options don't affect fundamental abilities such as SupportsProjectionPushDown
or
SupportsFilterPushDown
.
For example, given a database connector, if an option defines the connection timeout,
changing this value does not affect the pipeline topology and can be allowed. However, an
option that defines whether the connector supports SupportsReadingMetadata
or not is
not allowed. The planner might not react to changed abilities anymore.
forwardOptions
in interface DynamicTableFactory
DynamicTableFactory.Context.getEnrichmentOptions()
,
FactoryUtil.TableFactoryHelper.getOptions()
,
FormatFactory.forwardOptions()
public DynamicTableSource createDynamicTableSource(DynamicTableFactory.Context context)
DynamicTableSourceFactory
DynamicTableSource
instance from a CatalogTable
and additional
context information.
An implementation should perform validation and the discovery of further (nested) factories in this method.
createDynamicTableSource
in interface DynamicTableSourceFactory
public DynamicTableSink createDynamicTableSink(DynamicTableFactory.Context context)
DynamicTableSinkFactory
DynamicTableSink
instance from a CatalogTable
and additional
context information.
An implementation should perform validation and the discovery of further (nested) factories in this method.
createDynamicTableSink
in interface DynamicTableSinkFactory
protected KafkaDynamicSource createKafkaTableSource(DataType physicalDataType, @Nullable DecodingFormat<DeserializationSchema<RowData>> keyDecodingFormat, DecodingFormat<DeserializationSchema<RowData>> valueDecodingFormat, int[] keyProjection, int[] valueProjection, @Nullable String keyPrefix, @Nullable List<String> topics, @Nullable Pattern topicPattern, Properties properties, StartupMode startupMode, Map<KafkaTopicPartition,Long> specificStartupOffsets, long startupTimestampMillis, BoundedMode boundedMode, Map<KafkaTopicPartition,Long> specificEndOffsets, long endTimestampMillis, String tableIdentifier)
protected KafkaDynamicSink createKafkaTableSink(DataType physicalDataType, @Nullable EncodingFormat<SerializationSchema<RowData>> keyEncodingFormat, EncodingFormat<SerializationSchema<RowData>> valueEncodingFormat, int[] keyProjection, int[] valueProjection, @Nullable String keyPrefix, String topic, Properties properties, FlinkKafkaPartitioner<RowData> partitioner, DeliveryGuarantee deliveryGuarantee, Integer parallelism, @Nullable String transactionalIdPrefix)
Copyright © 2014–2023 The Apache Software Foundation. All rights reserved.