net.nutch.mapReduce
Class DefaultPartitioner
java.lang.Object
net.nutch.mapReduce.DefaultPartitioner
- All Implemented Interfaces:
- Partitioner
- public class DefaultPartitioner
- extends Object
- implements Partitioner
The default Partitioner
. Uses Object.hashCode()
to
partition keys.
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
DefaultPartitioner
public DefaultPartitioner()
getPartition
public int getPartition(WritableComparable key,
int numReduceTasks)
- Use
Object.hashCode()
to partition.
- Specified by:
getPartition
in interface Partitioner
- Parameters:
key
- the keynumReduceTasks
- the number of partitions
- Returns:
- the partition number
Copyright © 2005 The Nutch Organization.