org.apache.hadoop.examples.pi
Class DistSum.ReduceSide.IndexPartitioner

java.lang.Object
  extended by org.apache.hadoop.mapreduce.Partitioner<org.apache.hadoop.io.IntWritable,SummationWritable>
      extended by org.apache.hadoop.examples.pi.DistSum.ReduceSide.IndexPartitioner
Enclosing class:
DistSum.ReduceSide

public static class DistSum.ReduceSide.IndexPartitioner
extends org.apache.hadoop.mapreduce.Partitioner<org.apache.hadoop.io.IntWritable,SummationWritable>

Use the index for partitioning.


Constructor Summary
DistSum.ReduceSide.IndexPartitioner()
           
 
Method Summary
 int getPartition(org.apache.hadoop.io.IntWritable index, SummationWritable value, int numPartitions)
          Return the index as the partition.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

DistSum.ReduceSide.IndexPartitioner

public DistSum.ReduceSide.IndexPartitioner()
Method Detail

getPartition

public int getPartition(org.apache.hadoop.io.IntWritable index,
                        SummationWritable value,
                        int numPartitions)
Return the index as the partition.

Specified by:
getPartition in class org.apache.hadoop.mapreduce.Partitioner<org.apache.hadoop.io.IntWritable,SummationWritable>


Copyright © 2014 Apache Software Foundation. All Rights Reserved.