net.nutch.mapReduce
Class DefaultPartitioner

java.lang.Object
  extended bynet.nutch.mapReduce.DefaultPartitioner
All Implemented Interfaces:
Partitioner

public class DefaultPartitioner
extends Object
implements Partitioner

The default Partitioner. Uses Object.hashCode() to partition keys.


Constructor Summary
DefaultPartitioner()
           
 
Method Summary
 int getPartition(WritableComparable key, 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

DefaultPartitioner

public DefaultPartitioner()
Method Detail

getPartition

public int getPartition(WritableComparable key,
                        int numReduceTasks)
Use Object.hashCode() to partition.

Specified by:
getPartition in interface Partitioner
Parameters:
key - the key
numReduceTasks - the number of partitions
Returns:
the partition number


Copyright © 2005 The Nutch Organization.