|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectorg.apache.hadoop.mapreduce.Partitioner<K,V>
org.apache.hadoop.mapreduce.lib.partition.HashPartitioner<K,V>
public class HashPartitioner<K,V>
Partition keys by their Object.hashCode().
| Constructor Summary | |
|---|---|
HashPartitioner()
|
|
| Method Summary | |
|---|---|
int |
getPartition(K key,
V value,
int numReduceTasks)
Use Object.hashCode() to partition. |
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Constructor Detail |
|---|
public HashPartitioner()
| Method Detail |
|---|
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.
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||