@InterfaceAudience.Public @InterfaceStability.Stable public class HashPartitioner<K,V> extends Partitioner<K,V>
Object.hashCode()
.Constructor and Description |
---|
HashPartitioner() |
Modifier and Type | Method and Description |
---|---|
int |
getPartition(K key,
V value,
int numReduceTasks)
Use
Object.hashCode() to partition. |
public int getPartition(K key, V value, int numReduceTasks)
Object.hashCode()
to partition.getPartition
in class Partitioner<K,V>
key
- the key to be partioned.value
- the entry value.numReduceTasks
- the total number of partitions.key
.Copyright © 2022 Apache Software Foundation. All rights reserved.