@Internal public class IdPartitioner extends Object implements Partitioner<Integer>
Constructor and Description |
---|
IdPartitioner() |
Modifier and Type | Method and Description |
---|---|
int |
partition(Integer key,
int numPartitions)
Computes the partition for the given key.
|
public int partition(Integer key, int numPartitions)
Partitioner
partition
in interface Partitioner<Integer>
key
- The key.numPartitions
- The number of partitions to partition into.Copyright © 2014–2023 The Apache Software Foundation. All rights reserved.