|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object org.apache.hadoop.examples.SecondarySort
public class SecondarySort
This is an example Hadoop Map/Reduce application. It reads the text input files that must contain two integers per a line. The output is sorted by the first and second number and grouped on the first number. To run: bin/hadoop jar build/hadoop-examples.jar secondarysort in-dir out-dir
Nested Class Summary | |
---|---|
static class |
SecondarySort.FirstGroupingComparator
Compare only the first part of the pair, so that reduce is called once for each value of the first part. |
static class |
SecondarySort.FirstPartitioner
Partition based on the first part of the pair. |
static class |
SecondarySort.IntPair
Define a pair of integers that are writable. |
static class |
SecondarySort.MapClass
Read two integers from each line and generate a key, value pair as ((left, right), right). |
static class |
SecondarySort.Reduce
A reducer class that just emits the sum of the input values. |
Constructor Summary | |
---|---|
SecondarySort()
|
Method Summary | |
---|---|
static void |
main(String[] args)
|
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Constructor Detail |
---|
public SecondarySort()
Method Detail |
---|
public static void main(String[] args) throws Exception
Exception
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |