@PublicEvolving
public class Kafka08JsonTableSink
extends org.apache.flink.streaming.connectors.kafka.KafkaJsonTableSink
KafkaTableSink that serializes data in JSON format.| Constructor and Description |
|---|
Kafka08JsonTableSink(String topic,
Properties properties)
Creates
KafkaTableSink to write table rows as JSON-encoded records to a Kafka 0.8
topic with fixed partition assignment. |
Kafka08JsonTableSink(String topic,
Properties properties,
org.apache.flink.streaming.connectors.kafka.partitioner.FlinkKafkaPartitioner<org.apache.flink.types.Row> partitioner)
Creates
KafkaTableSink to write table rows as JSON-encoded records to a Kafka 0.8
topic with custom partition assignment. |
Kafka08JsonTableSink(String topic,
Properties properties,
org.apache.flink.streaming.connectors.kafka.partitioner.KafkaPartitioner<org.apache.flink.types.Row> partitioner)
Deprecated.
This is a deprecated constructor that does not correctly handle partitioning when
producing to multiple topics. Use
Kafka08JsonTableSink(String, Properties, FlinkKafkaPartitioner) instead. |
| Modifier and Type | Method and Description |
|---|---|
protected Kafka08JsonTableSink |
createCopy() |
protected org.apache.flink.streaming.connectors.kafka.FlinkKafkaProducerBase<org.apache.flink.types.Row> |
createKafkaProducer(String topic,
Properties properties,
org.apache.flink.api.common.serialization.SerializationSchema<org.apache.flink.types.Row> serializationSchema,
org.apache.flink.streaming.connectors.kafka.partitioner.FlinkKafkaPartitioner<org.apache.flink.types.Row> partitioner) |
createSerializationSchemapublic Kafka08JsonTableSink(String topic, Properties properties)
KafkaTableSink to write table rows as JSON-encoded records to a Kafka 0.8
topic with fixed partition assignment.
Each parallel TableSink instance will write its rows to a single Kafka partition.
topic - topic in Kafka to which table is writtenproperties - properties to connect to Kafkapublic Kafka08JsonTableSink(String topic, Properties properties, org.apache.flink.streaming.connectors.kafka.partitioner.FlinkKafkaPartitioner<org.apache.flink.types.Row> partitioner)
KafkaTableSink to write table rows as JSON-encoded records to a Kafka 0.8
topic with custom partition assignment.topic - topic in Kafka to which table is writtenproperties - properties to connect to Kafkapartitioner - Kafka partitioner@Deprecated public Kafka08JsonTableSink(String topic, Properties properties, org.apache.flink.streaming.connectors.kafka.partitioner.KafkaPartitioner<org.apache.flink.types.Row> partitioner)
Kafka08JsonTableSink(String, Properties, FlinkKafkaPartitioner) instead.KafkaTableSink to write table rows as JSON-encoded records to a Kafka 0.8
topic with custom partition assignment.topic - topic in Kafka to which table is writtenproperties - properties to connect to Kafkapartitioner - Kafka partitionerprotected org.apache.flink.streaming.connectors.kafka.FlinkKafkaProducerBase<org.apache.flink.types.Row> createKafkaProducer(String topic, Properties properties, org.apache.flink.api.common.serialization.SerializationSchema<org.apache.flink.types.Row> serializationSchema, org.apache.flink.streaming.connectors.kafka.partitioner.FlinkKafkaPartitioner<org.apache.flink.types.Row> partitioner)
createKafkaProducer in class org.apache.flink.streaming.connectors.kafka.KafkaTableSinkprotected Kafka08JsonTableSink createCopy()
createCopy in class org.apache.flink.streaming.connectors.kafka.KafkaTableSinkCopyright © 2014–2018 The Apache Software Foundation. All rights reserved.