@Internal public class KafkaDynamicSink extends Object implements org.apache.flink.table.connector.sink.DynamicTableSink, org.apache.flink.table.connector.sink.abilities.SupportsWritingMetadata
DynamicTableSink.| 限定符和类型 | 字段和说明 |
|---|---|
protected org.apache.flink.table.types.DataType |
consumedDataType
Data type of consumed data type.
|
protected SinkBufferFlushMode |
flushMode
Sink buffer flush config which only supported in upsert mode now.
|
protected org.apache.flink.table.connector.format.EncodingFormat<org.apache.flink.api.common.serialization.SerializationSchema<org.apache.flink.table.data.RowData>> |
keyEncodingFormat
Optional format for encoding keys to Kafka.
|
protected String |
keyPrefix
Prefix that needs to be removed from fields when constructing the physical data type.
|
protected int[] |
keyProjection
Indices that determine the key fields and the source position in the consumed row.
|
protected List<String> |
metadataKeys
Metadata that is appended at the end of a physical sink row.
|
protected Integer |
parallelism
Parallelism of the physical Kafka producer
|
protected FlinkKafkaPartitioner<org.apache.flink.table.data.RowData> |
partitioner
Partitioner to select Kafka partition for each item.
|
protected org.apache.flink.table.types.DataType |
physicalDataType
Data type to configure the formats.
|
protected Properties |
properties
Properties for the Kafka producer.
|
protected String |
topic
The Kafka topic to write to.
|
protected boolean |
upsertMode
Flag to determine sink mode.
|
protected org.apache.flink.table.connector.format.EncodingFormat<org.apache.flink.api.common.serialization.SerializationSchema<org.apache.flink.table.data.RowData>> |
valueEncodingFormat
Format for encoding values to Kafka.
|
protected int[] |
valueProjection
Indices that determine the value fields and the source position in the consumed row.
|
| 构造器和说明 |
|---|
KafkaDynamicSink(org.apache.flink.table.types.DataType consumedDataType,
org.apache.flink.table.types.DataType physicalDataType,
org.apache.flink.table.connector.format.EncodingFormat<org.apache.flink.api.common.serialization.SerializationSchema<org.apache.flink.table.data.RowData>> keyEncodingFormat,
org.apache.flink.table.connector.format.EncodingFormat<org.apache.flink.api.common.serialization.SerializationSchema<org.apache.flink.table.data.RowData>> valueEncodingFormat,
int[] keyProjection,
int[] valueProjection,
String keyPrefix,
String topic,
Properties properties,
FlinkKafkaPartitioner<org.apache.flink.table.data.RowData> partitioner,
org.apache.flink.connector.base.DeliveryGuarantee deliveryGuarantee,
boolean upsertMode,
SinkBufferFlushMode flushMode,
Integer parallelism,
String transactionalIdPrefix) |
| 限定符和类型 | 方法和说明 |
|---|---|
void |
applyWritableMetadata(List<String> metadataKeys,
org.apache.flink.table.types.DataType consumedDataType) |
String |
asSummaryString() |
org.apache.flink.table.connector.sink.DynamicTableSink |
copy() |
boolean |
equals(Object o) |
org.apache.flink.table.connector.ChangelogMode |
getChangelogMode(org.apache.flink.table.connector.ChangelogMode requestedMode) |
org.apache.flink.table.connector.sink.DynamicTableSink.SinkRuntimeProvider |
getSinkRuntimeProvider(org.apache.flink.table.connector.sink.DynamicTableSink.Context context) |
int |
hashCode() |
Map<String,org.apache.flink.table.types.DataType> |
listWritableMetadata() |
protected List<String> metadataKeys
protected org.apache.flink.table.types.DataType consumedDataType
protected final org.apache.flink.table.types.DataType physicalDataType
@Nullable protected final org.apache.flink.table.connector.format.EncodingFormat<org.apache.flink.api.common.serialization.SerializationSchema<org.apache.flink.table.data.RowData>> keyEncodingFormat
protected final org.apache.flink.table.connector.format.EncodingFormat<org.apache.flink.api.common.serialization.SerializationSchema<org.apache.flink.table.data.RowData>> valueEncodingFormat
protected final int[] keyProjection
protected final int[] valueProjection
@Nullable protected final String keyPrefix
protected final String topic
protected final Properties properties
@Nullable protected final FlinkKafkaPartitioner<org.apache.flink.table.data.RowData> partitioner
protected final boolean upsertMode
protected final SinkBufferFlushMode flushMode
public KafkaDynamicSink(org.apache.flink.table.types.DataType consumedDataType,
org.apache.flink.table.types.DataType physicalDataType,
@Nullable
org.apache.flink.table.connector.format.EncodingFormat<org.apache.flink.api.common.serialization.SerializationSchema<org.apache.flink.table.data.RowData>> keyEncodingFormat,
org.apache.flink.table.connector.format.EncodingFormat<org.apache.flink.api.common.serialization.SerializationSchema<org.apache.flink.table.data.RowData>> valueEncodingFormat,
int[] keyProjection,
int[] valueProjection,
@Nullable
String keyPrefix,
String topic,
Properties properties,
@Nullable
FlinkKafkaPartitioner<org.apache.flink.table.data.RowData> partitioner,
org.apache.flink.connector.base.DeliveryGuarantee deliveryGuarantee,
boolean upsertMode,
SinkBufferFlushMode flushMode,
@Nullable
Integer parallelism,
@Nullable
String transactionalIdPrefix)
public org.apache.flink.table.connector.ChangelogMode getChangelogMode(org.apache.flink.table.connector.ChangelogMode requestedMode)
getChangelogMode 在接口中 org.apache.flink.table.connector.sink.DynamicTableSinkpublic org.apache.flink.table.connector.sink.DynamicTableSink.SinkRuntimeProvider getSinkRuntimeProvider(org.apache.flink.table.connector.sink.DynamicTableSink.Context context)
getSinkRuntimeProvider 在接口中 org.apache.flink.table.connector.sink.DynamicTableSinkpublic Map<String,org.apache.flink.table.types.DataType> listWritableMetadata()
listWritableMetadata 在接口中 org.apache.flink.table.connector.sink.abilities.SupportsWritingMetadatapublic void applyWritableMetadata(List<String> metadataKeys, org.apache.flink.table.types.DataType consumedDataType)
applyWritableMetadata 在接口中 org.apache.flink.table.connector.sink.abilities.SupportsWritingMetadatapublic org.apache.flink.table.connector.sink.DynamicTableSink copy()
copy 在接口中 org.apache.flink.table.connector.sink.DynamicTableSinkpublic String asSummaryString()
asSummaryString 在接口中 org.apache.flink.table.connector.sink.DynamicTableSinkCopyright © 2014–2023 The Apache Software Foundation. All rights reserved.