public static class SecondarySort.FirstPartitioner extends Partitioner<SecondarySort.IntPair,IntWritable>
Constructor and Description |
---|
FirstPartitioner() |
Modifier and Type | Method and Description |
---|---|
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.
|
public int getPartition(SecondarySort.IntPair key, IntWritable value, int numPartitions)
Partitioner
Typically a hash function on a all or a subset of the key.
getPartition
in class Partitioner<SecondarySort.IntPair,IntWritable>
key
- the key to be partioned.value
- the entry value.numPartitions
- the total number of partitions.key
.Copyright © 2010 The Apache Software Foundation