org.apache.hadoop.examples.terasort
Class TeraSort.SimplePartitioner
java.lang.Object
org.apache.hadoop.mapreduce.Partitioner<org.apache.hadoop.io.Text,org.apache.hadoop.io.Text>
org.apache.hadoop.examples.terasort.TeraSort.SimplePartitioner
- All Implemented Interfaces:
- org.apache.hadoop.conf.Configurable
- Enclosing class:
- TeraSort
public static class TeraSort.SimplePartitioner
- extends org.apache.hadoop.mapreduce.Partitioner<org.apache.hadoop.io.Text,org.apache.hadoop.io.Text>
- implements org.apache.hadoop.conf.Configurable
A total order partitioner that assigns keys based on their first
PREFIX_LENGTH bytes, assuming a flat distribution.
|
Method Summary |
org.apache.hadoop.conf.Configuration |
getConf()
|
int |
getPartition(org.apache.hadoop.io.Text key,
org.apache.hadoop.io.Text value,
int numPartitions)
|
void |
setConf(org.apache.hadoop.conf.Configuration conf)
|
| Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
TeraSort.SimplePartitioner
public TeraSort.SimplePartitioner()
setConf
public void setConf(org.apache.hadoop.conf.Configuration conf)
- Specified by:
setConf in interface org.apache.hadoop.conf.Configurable
getConf
public org.apache.hadoop.conf.Configuration getConf()
- Specified by:
getConf in interface org.apache.hadoop.conf.Configurable
getPartition
public int getPartition(org.apache.hadoop.io.Text key,
org.apache.hadoop.io.Text value,
int numPartitions)
- Specified by:
getPartition in class org.apache.hadoop.mapreduce.Partitioner<org.apache.hadoop.io.Text,org.apache.hadoop.io.Text>
Copyright © 2013 Apache Software Foundation. All Rights Reserved.