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