K
- The type of the key to be partitioned.@Public @FunctionalInterface public interface Partitioner<K> extends Serializable, Function
Modifier and Type | Method and Description |
---|---|
int |
partition(K key,
int numPartitions)
Computes the partition for the given key.
|
int partition(K key, int numPartitions)
key
- The key.numPartitions
- The number of partitions to partition into.Copyright © 2014–2024 The Apache Software Foundation. All rights reserved.