T
- record type@PublicEvolving public abstract class KinesisPartitioner<T> extends Object implements Serializable
Constructor and Description |
---|
KinesisPartitioner() |
Modifier and Type | Method and Description |
---|---|
String |
getExplicitHashKey(T element)
Optional method for setting an explicit hash key.
|
abstract String |
getPartitionId(T element)
Return a partition id based on the input.
|
void |
initialize(int indexOfThisSubtask,
int numberOfParallelSubtasks)
Optional initializer.
|
public abstract String getPartitionId(T element)
element
- Element to partitionpublic String getExplicitHashKey(T element)
element
- Element to get the hash key forpublic void initialize(int indexOfThisSubtask, int numberOfParallelSubtasks)
indexOfThisSubtask
- Index of this partitioner instancenumberOfParallelSubtasks
- Total number of parallel instancesCopyright © 2014–2021 The Apache Software Foundation. All rights reserved.