@InterfaceAudience.Public @InterfaceStability.Evolving public class HashPartitioner extends Object implements Partitioner
Partitioner
that does hash based partitioningConstructor and Description |
---|
HashPartitioner() |
Modifier and Type | Method and Description |
---|---|
int |
getPartition(Object key,
Object value,
int numPartitions)
Get partition for given key/value.
|
public int getPartition(Object key, Object value, int numPartitions)
Partitioner
getPartition
in interface Partitioner
key
- keyvalue
- valuenumPartitions
- number of partitionsCopyright © 2024 Apache Software Foundation. All rights reserved.