public abstract class KafkaTableSourceSinkFactoryBase extends Object implements org.apache.flink.table.factories.StreamTableSourceFactory<Row>, org.apache.flink.table.factories.StreamTableSinkFactory<Row>
KafkaTableSource
.Constructor and Description |
---|
KafkaTableSourceSinkFactoryBase() |
Modifier and Type | Method and Description |
---|---|
protected abstract KafkaTableSink |
createKafkaTableSink(org.apache.flink.table.api.TableSchema schema,
String topic,
Properties properties,
Optional<FlinkKafkaPartitioner<Row>> partitioner,
SerializationSchema<Row> serializationSchema)
Constructs the version-specific Kafka table sink.
|
protected abstract KafkaTableSource |
createKafkaTableSource(org.apache.flink.table.api.TableSchema schema,
Optional<String> proctimeAttribute,
List<org.apache.flink.table.sources.RowtimeAttributeDescriptor> rowtimeAttributeDescriptors,
Map<String,String> fieldMapping,
String topic,
Properties properties,
DeserializationSchema<Row> deserializationSchema,
StartupMode startupMode,
Map<KafkaTopicPartition,Long> specificStartupOffsets)
Constructs the version-specific Kafka table source.
|
org.apache.flink.table.sinks.StreamTableSink<Row> |
createStreamTableSink(Map<String,String> properties) |
org.apache.flink.table.sources.StreamTableSource<Row> |
createStreamTableSource(Map<String,String> properties) |
protected abstract String |
kafkaVersion()
Returns the Kafka version.
|
Map<String,String> |
requiredContext() |
List<String> |
supportedProperties() |
protected abstract boolean |
supportsKafkaTimestamps()
True if the Kafka source supports Kafka timestamps, false otherwise.
|
public Map<String,String> requiredContext()
requiredContext
in interface org.apache.flink.table.factories.TableFactory
public List<String> supportedProperties()
supportedProperties
in interface org.apache.flink.table.factories.TableFactory
public org.apache.flink.table.sources.StreamTableSource<Row> createStreamTableSource(Map<String,String> properties)
createStreamTableSource
in interface org.apache.flink.table.factories.StreamTableSourceFactory<Row>
public org.apache.flink.table.sinks.StreamTableSink<Row> createStreamTableSink(Map<String,String> properties)
createStreamTableSink
in interface org.apache.flink.table.factories.StreamTableSinkFactory<Row>
protected abstract String kafkaVersion()
protected abstract boolean supportsKafkaTimestamps()
protected abstract KafkaTableSource createKafkaTableSource(org.apache.flink.table.api.TableSchema schema, Optional<String> proctimeAttribute, List<org.apache.flink.table.sources.RowtimeAttributeDescriptor> rowtimeAttributeDescriptors, Map<String,String> fieldMapping, String topic, Properties properties, DeserializationSchema<Row> deserializationSchema, StartupMode startupMode, Map<KafkaTopicPartition,Long> specificStartupOffsets)
schema
- Schema of the produced table.proctimeAttribute
- Field name of the processing time attribute.rowtimeAttributeDescriptors
- Descriptor for a rowtime attributefieldMapping
- Mapping for the fields of the table schema to
fields of the physical returned type.topic
- Kafka topic to consume.properties
- Properties for the Kafka consumer.deserializationSchema
- Deserialization schema for decoding records from Kafka.startupMode
- Startup mode for the contained consumer.specificStartupOffsets
- Specific startup offsets; only relevant when startup
mode is StartupMode.SPECIFIC_OFFSETS
.protected abstract KafkaTableSink createKafkaTableSink(org.apache.flink.table.api.TableSchema schema, String topic, Properties properties, Optional<FlinkKafkaPartitioner<Row>> partitioner, SerializationSchema<Row> serializationSchema)
schema
- Schema of the produced table.topic
- Kafka topic to consume.properties
- Properties for the Kafka consumer.partitioner
- Partitioner to select Kafka partition for each item.Copyright © 2014–2020 The Apache Software Foundation. All rights reserved.