KafkaPartitioner
, use FlinkKafkaPartitioner
instead@Deprecated @Internal public class FlinkKafkaDelegatePartitioner<T> extends FlinkKafkaPartitioner<T>
KafkaPartitioner
.
This should only be used for bridging deprecated partitioning API methods.Constructor and Description |
---|
FlinkKafkaDelegatePartitioner(KafkaPartitioner<T> kafkaPartitioner)
Deprecated.
|
Modifier and Type | Method and Description |
---|---|
void |
open(int parallelInstanceId,
int parallelInstances)
Deprecated.
Initializer for the partitioner.
|
int |
partition(T next,
byte[] serializedKey,
byte[] serializedValue,
String targetTopic,
int[] partitions)
Deprecated.
Determine the id of the partition that the record should be written to.
|
void |
setPartitions(int[] partitions)
Deprecated.
|
public FlinkKafkaDelegatePartitioner(KafkaPartitioner<T> kafkaPartitioner)
public void setPartitions(int[] partitions)
public void open(int parallelInstanceId, int parallelInstances)
FlinkKafkaPartitioner
open
in class FlinkKafkaPartitioner<T>
parallelInstanceId
- 0-indexed id of the parallel sink instance in FlinkparallelInstances
- the total number of parallel instancespublic int partition(T next, byte[] serializedKey, byte[] serializedValue, String targetTopic, int[] partitions)
FlinkKafkaPartitioner
partition
in class FlinkKafkaPartitioner<T>
next
- the record valueserializedKey
- serialized key of the recordserializedValue
- serialized value of the recordtargetTopic
- target topic for the recordpartitions
- found partitions for the target topicCopyright © 2014–2020 The Apache Software Foundation. All rights reserved.