Class IndexUpdatePartitioner

  extended by org.apache.hadoop.contrib.index.mapred.IndexUpdatePartitioner
All Implemented Interfaces:
JobConfigurable, Partitioner<Shard,IntermediateForm>

public class IndexUpdatePartitioner
extends Object
implements Partitioner<Shard,IntermediateForm>

This partitioner class puts the values of the same key - in this case the same shard - in the same partition.

Constructor Summary
Method Summary
 void configure(JobConf job)
          Initializes a new instance from a JobConf.
 int getPartition(Shard key, IntermediateForm value, int numPartitions)
          Get the paritition number for a given key (hence record) given the total number of partitions i.e.
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait

Constructor Detail


public IndexUpdatePartitioner()
Method Detail


public int getPartition(Shard key,
                        IntermediateForm value,
                        int numPartitions)
Description copied from interface: Partitioner
Get the paritition number for a given key (hence record) given the total number of partitions i.e. number of reduce-tasks for the job.

Typically a hash function on a all or a subset of the key.

Specified by:
getPartition in interface Partitioner<Shard,IntermediateForm>
key - the key to be paritioned.
value - the entry value.
numPartitions - the total number of partitions.
the partition number for the key.


public void configure(JobConf job)
Description copied from interface: JobConfigurable
Initializes a new instance from a JobConf.

Specified by:
configure in interface JobConfigurable
job - the configuration

Copyright © 2009 The Apache Software Foundation