@Internal public class KafkaTableSource extends KafkaTableSourceBase
StreamTableSource
.Constructor and Description |
---|
KafkaTableSource(TableSchema schema,
Optional<String> proctimeAttribute,
List<RowtimeAttributeDescriptor> rowtimeAttributeDescriptors,
Optional<Map<String,String>> fieldMapping,
String topic,
Properties properties,
DeserializationSchema<Row> deserializationSchema,
StartupMode startupMode,
Map<KafkaTopicPartition,Long> specificStartupOffsets)
Creates a generic Kafka
StreamTableSource . |
KafkaTableSource(TableSchema schema,
String topic,
Properties properties,
DeserializationSchema<Row> deserializationSchema)
Creates a generic Kafka
StreamTableSource . |
Modifier and Type | Method and Description |
---|---|
protected FlinkKafkaConsumerBase<Row> |
createKafkaConsumer(String topic,
Properties properties,
DeserializationSchema<Row> deserializationSchema)
Creates a version-specific Kafka consumer.
|
equals, explainSource, getDataStream, getDeserializationSchema, getFieldMapping, getKafkaConsumer, getProctimeAttribute, getProperties, getReturnType, getRowtimeAttributeDescriptors, getTableSchema, hashCode
clone, finalize, getClass, notify, notifyAll, toString, wait, wait, wait
isBounded
getProducedDataType
public KafkaTableSource(TableSchema schema, Optional<String> proctimeAttribute, List<RowtimeAttributeDescriptor> rowtimeAttributeDescriptors, Optional<Map<String,String>> fieldMapping, String topic, Properties properties, DeserializationSchema<Row> deserializationSchema, StartupMode startupMode, Map<KafkaTopicPartition,Long> specificStartupOffsets)
StreamTableSource
.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
.public KafkaTableSource(TableSchema schema, String topic, Properties properties, DeserializationSchema<Row> deserializationSchema)
StreamTableSource
.schema
- Schema of the produced table.topic
- Kafka topic to consume.properties
- Properties for the Kafka consumer.deserializationSchema
- Deserialization schema for decoding records from Kafka.protected FlinkKafkaConsumerBase<Row> createKafkaConsumer(String topic, Properties properties, DeserializationSchema<Row> deserializationSchema)
KafkaTableSourceBase
createKafkaConsumer
in class KafkaTableSourceBase
topic
- Kafka topic to consume.properties
- Properties for the Kafka consumer.deserializationSchema
- Deserialization schema to use for Kafka records.Copyright © 2014–2020 The Apache Software Foundation. All rights reserved.