Overview | Package | Class | Use | Tree | Deprecated | Index | Help
PREV CLASS NEXT CLASS | FRAMES NO FRAMES
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD

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

    java.lang.Object
      org.apache.hadoop.conf.Configured
          org.apache.hadoop.examples.Sort<K,V>

All Implemented Interfaces:
  Configurable, Tool

    public class Sort<K,V>

extends Configured
implements 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 [-m maps] [-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

Constructor Summary
`Sort()`

Method Summary
`RunningJob` | `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`

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 `Tool`
  Parameters:
    `args` - command specific arguments.
  Returns:
    exit code.
  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 RunningJob getResult()

  Get the last job that was run using this instance.

  Returns:
    the results of the last job that was run

Overview | Package | Class | Use | Tree | Deprecated | Index | Help
PREV CLASS NEXT CLASS | FRAMES NO FRAMES
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD

Copyright © 2009 The Apache Software Foundation