|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectp2pMapReduce.mapreduceModule.Partitioner<K2,V2>
p2pMapReduce.mapreduceModule.output.HashPartitioner<K2,V2>
public class HashPartitioner<K2,V2>
Partition keys by their Object.hashCode()
.
Constructor Summary | |
---|---|
HashPartitioner()
|
Method Summary | |
---|---|
void |
configure(JobConf job)
|
int |
getPartition(K2 key,
V2 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 void configure(JobConf job)
public int getPartition(K2 key, V2 value, int numReduceTasks)
Object.hashCode()
to partition.
getPartition
in class Partitioner<K2,V2>
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 |