@PublicEvolving public final class FixedKinesisPartitioner<T> extends KinesisPartitioner<T>
This is achieved by using the index of the producer task as a PartitionKey.
| Constructor and Description |
|---|
FixedKinesisPartitioner() |
| Modifier and Type | Method and Description |
|---|---|
boolean |
equals(Object o) |
String |
getPartitionId(T record)
Return a partition id based on the input.
|
int |
hashCode() |
void |
initialize(int indexOfThisSubtask,
int numberOfParallelSubtasks)
Optional initializer.
|
getExplicitHashKeypublic void initialize(int indexOfThisSubtask,
int numberOfParallelSubtasks)
KinesisPartitionerinitialize in class KinesisPartitioner<T>indexOfThisSubtask - Index of this partitioner instancenumberOfParallelSubtasks - Total number of parallel instancespublic String getPartitionId(T record)
KinesisPartitionergetPartitionId in class KinesisPartitioner<T>record - Element to partitionCopyright © 2014–2022 The Apache Software Foundation. All rights reserved.