net.nutch.mapReduce
Interface Partitioner

All Known Implementing Classes:
DefaultPartitioner

public interface Partitioner

Partitions the key space. A partition is created for each reduce task.


Method Summary
 int getPartition(WritableComparable key, int numPartitions)
          Returns the paritition number for a given key given the total number of partitions.
 

Method Detail

getPartition

public int getPartition(WritableComparable key,
                        int numPartitions)
Returns the paritition number for a given key given the total number of partitions. Typically a hash function on a all or a subset of the key.

Parameters:
key - the key
numPartitions - the number of partitions
Returns:
the partition number


Copyright © 2005 The Nutch Organization.