public static class TeraSort.SimplePartitioner extends Partitioner<Text,Text> implements Configurable
Constructor and Description |
---|
TeraSort.SimplePartitioner() |
Modifier and Type | Method and Description |
---|---|
Configuration |
getConf()
Return the configuration used by this object.
|
int |
getPartition(Text key,
Text value,
int numPartitions)
Get the partition number for a given key (hence record) given the total
number of partitions i.e.
|
void |
setConf(Configuration conf)
Set the configuration to be used by this object.
|
public void setConf(Configuration conf)
Configurable
setConf
in interface Configurable
public Configuration getConf()
Configurable
getConf
in interface Configurable
public int getPartition(Text key, Text value, int numPartitions)
Partitioner
Typically a hash function on a all or a subset of the key.
getPartition
in class Partitioner<Text,Text>
key
- the key to be partioned.value
- the entry value.numPartitions
- the total number of partitions.key
.Copyright © 2013 Apache Software Foundation. All rights reserved.