T - record type@PublicEvolving public abstract class KinesisPartitioner<T> extends Object implements Serializable, org.apache.flink.connector.kinesis.sink.PartitionKeyGenerator<T>
| Constructor and Description |
|---|
KinesisPartitioner() |
| Modifier and Type | Method and Description |
|---|---|
String |
apply(T element) |
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.
|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitandThen, compose, identitypublic 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 instancespublic String apply(T element)
apply in interface java.util.function.Function<T,String>Copyright © 2022–2024 The Apache Software Foundation. All rights reserved.