SecondarySort.FirstPartitioner (Hadoop 1.2.1 API)
Date: 2013-07-22

Overview | Package | Class | Use | Tree | Deprecated | Index | Help
PREV CLASS NEXT CLASS | FRAMES NO FRAMES
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD

## org.apache.hadoop.examples
Class SecondarySort.FirstPartitioner

    java.lang.Object
      org.apache.hadoop.mapreduce.Partitioner<SecondarySort.IntPair,IntWritable>
          org.apache.hadoop.examples.SecondarySort.FirstPartitioner

Enclosing class:
  SecondarySort

    public static class SecondarySort.FirstPartitioner

extends Partitioner<SecondarySort.IntPair,IntWritable>

Partition based on the first part of the pair.

Constructor Summary
`SecondarySort.FirstPartitioner()`

Method Summary
`int` | `getPartition(SecondarySort.IntPair key, IntWritable value, int numPartitions)` Get the partition 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

### SecondarySort.FirstPartitioner

    public SecondarySort.FirstPartitioner()

Method Detail

### getPartition

    public int getPartition(SecondarySort.IntPair key,
                            IntWritable value,
                            int numPartitions)

  Description copied from class: `Partitioner`
  Get the partition 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 class `Partitioner<SecondarySort.IntPair,IntWritable>`
  Parameters:
    `key` - the key to be partioned.
    `value` - the entry value.
    `numPartitions` - the total number of partitions.
  Returns:
    the partition number for the `key`.

Overview | Package | Class | Use | Tree | Deprecated | Index | Help
PREV CLASS NEXT CLASS | FRAMES NO FRAMES
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD

Copyright © 2009 The Apache Software Foundation