@PublicEvolving
public class Kafka011JsonTableSource
extends org.apache.flink.streaming.connectors.kafka.KafkaJsonTableSource
StreamTableSource for Kafka 0.11.| Modifier and Type | Class and Description |
|---|---|
static class |
Kafka011JsonTableSource.Builder
A builder to configure and create a
Kafka011JsonTableSource. |
| Constructor and Description |
|---|
Kafka011JsonTableSource(String topic,
Properties properties,
org.apache.flink.table.api.TableSchema tableSchema,
org.apache.flink.table.api.TableSchema jsonSchema)
Creates a Kafka 0.11 JSON
StreamTableSource. |
| Modifier and Type | Method and Description |
|---|---|
static Kafka011JsonTableSource.Builder |
builder()
Returns a builder to configure and create a
Kafka011JsonTableSource. |
protected org.apache.flink.streaming.connectors.kafka.FlinkKafkaConsumerBase<org.apache.flink.types.Row> |
createKafkaConsumer(String topic,
Properties properties,
org.apache.flink.api.common.serialization.DeserializationSchema<org.apache.flink.types.Row> deserializationSchema) |
void |
setFailOnMissingField(boolean failOnMissingField)
Sets the flag that specifies the behavior in case of missing fields.
|
void |
setFieldMapping(Map<String,String> fieldMapping)
Sets the mapping from table schema fields to JSON schema fields.
|
void |
setProctimeAttribute(String proctimeAttribute)
Declares a field of the schema to be a processing time attribute.
|
void |
setRowtimeAttributeDescriptor(org.apache.flink.table.sources.RowtimeAttributeDescriptor rowtimeAttributeDescriptor)
Declares a field of the schema to be a rowtime attribute.
|
equals, explainSource, getDeserializationSchema, getFieldMapping, hashCodepublic Kafka011JsonTableSource(String topic, Properties properties, org.apache.flink.table.api.TableSchema tableSchema, org.apache.flink.table.api.TableSchema jsonSchema)
StreamTableSource.topic - Kafka topic to consume.properties - Properties for the Kafka consumer.tableSchema - The schema of the table.jsonSchema - The schema of the JSON messages to decode from Kafka.public void setFailOnMissingField(boolean failOnMissingField)
setFailOnMissingField in class org.apache.flink.streaming.connectors.kafka.KafkaJsonTableSourcefailOnMissingField - Flag that specifies the TableSource behavior in case of missing fields.public void setFieldMapping(Map<String,String> fieldMapping)
setFieldMapping in class org.apache.flink.streaming.connectors.kafka.KafkaJsonTableSourcefieldMapping - The mapping from table schema fields to JSON schema fields.public void setProctimeAttribute(String proctimeAttribute)
setProctimeAttribute in class org.apache.flink.streaming.connectors.kafka.KafkaTableSourceproctimeAttribute - The name of the field that becomes the processing time field.public void setRowtimeAttributeDescriptor(org.apache.flink.table.sources.RowtimeAttributeDescriptor rowtimeAttributeDescriptor)
rowtimeAttributeDescriptor - The descriptor of the rowtime attribute.protected org.apache.flink.streaming.connectors.kafka.FlinkKafkaConsumerBase<org.apache.flink.types.Row> createKafkaConsumer(String topic, Properties properties, org.apache.flink.api.common.serialization.DeserializationSchema<org.apache.flink.types.Row> deserializationSchema)
createKafkaConsumer in class org.apache.flink.streaming.connectors.kafka.KafkaTableSourcepublic static Kafka011JsonTableSource.Builder builder()
Kafka011JsonTableSource.Kafka011JsonTableSource.Copyright © 2014–2018 The Apache Software Foundation. All rights reserved.