org.apache.hadoop.examples
Class Sort<K,V>

java.lang.Object
  extended by org.apache.hadoop.conf.Configured
      extended by org.apache.hadoop.examples.Sort<K,V>
All Implemented Interfaces:
org.apache.hadoop.conf.Configurable, org.apache.hadoop.util.Tool

public class Sort<K,V>
extends org.apache.hadoop.conf.Configured
implements org.apache.hadoop.util.Tool

This is the trivial map/reduce program that does absolutely nothing other than use the framework to fragment and sort the input values. To run: bin/hadoop jar build/hadoop-examples.jar sort [-r reduces] [-inFormat input format class] [-outFormat output format class] [-outKey output key class] [-outValue output value class] [-totalOrder pcnt num samples max splits] in-dir out-dir


Field Summary
static String REDUCES_PER_HOST
           
 
Constructor Summary
Sort()
           
 
Method Summary
 Job getResult()
          Get the last job that was run using this instance.
static void main(String[] args)
           
 int run(String[] args)
          The main driver for sort program.
 
Methods inherited from class org.apache.hadoop.conf.Configured
getConf, setConf
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 
Methods inherited from interface org.apache.hadoop.conf.Configurable
getConf, setConf
 

Field Detail

REDUCES_PER_HOST

public static final String REDUCES_PER_HOST
See Also:
Constant Field Values
Constructor Detail

Sort

public Sort()
Method Detail

run

public int run(String[] args)
        throws Exception
The main driver for sort program. Invoke this method to submit the map/reduce job.

Specified by:
run in interface org.apache.hadoop.util.Tool
Throws:
IOException - When there is communication problems with the job tracker.
Exception

main

public static void main(String[] args)
                 throws Exception
Throws:
Exception

getResult

public Job getResult()
Get the last job that was run using this instance.

Returns:
the results of the last job that was run


Copyright © 2009 The Apache Software Foundation