org.apache.avro.mapred.tether
Class TetherJob

java.lang.Object
  extended by org.apache.hadoop.conf.Configured
      extended by org.apache.avro.mapred.tether.TetherJob
All Implemented Interfaces:
Tool, Configurable

public class TetherJob
extends Configured
implements Tool

Constructs and submits tether jobs. This may either be used as a commandline-based or API-based method to launch tether jobs.


Constructor Summary
TetherJob()
           
 
Method Summary
static URI getExecutable(org.apache.hadoop.mapred.JobConf job)
          Get the URI of the application's executable.
 String getName()
          Name of tool, to be used in listings.
 String getShortDescription()
          1-line description to be used in command listings.
 int run(InputStream ins, PrintStream outs, PrintStream err, List<String> args)
          Runs the tool with supplied arguments.
static org.apache.hadoop.mapred.RunningJob runJob(org.apache.hadoop.mapred.JobConf job)
          Submit a job to the map/reduce cluster.
static void setExecutable(org.apache.hadoop.mapred.JobConf job, URI executable)
          Set the URI for the application's executable.
static org.apache.hadoop.mapred.RunningJob submitJob(org.apache.hadoop.mapred.JobConf conf)
          Submit a job to the Map-Reduce framework.
 
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
 

Constructor Detail

TetherJob

public TetherJob()
Method Detail

getExecutable

public static URI getExecutable(org.apache.hadoop.mapred.JobConf job)
Get the URI of the application's executable.


setExecutable

public static void setExecutable(org.apache.hadoop.mapred.JobConf job,
                                 URI executable)
Set the URI for the application's executable. Normally this in HDFS.


runJob

public static org.apache.hadoop.mapred.RunningJob runJob(org.apache.hadoop.mapred.JobConf job)
                                                  throws IOException
Submit a job to the map/reduce cluster. All of the necessary modifications to the job to run under tether are made to the configuration.

Throws:
IOException

submitJob

public static org.apache.hadoop.mapred.RunningJob submitJob(org.apache.hadoop.mapred.JobConf conf)
                                                     throws IOException
Submit a job to the Map-Reduce framework.

Throws:
IOException

getName

public String getName()
Description copied from interface: Tool
Name of tool, to be used in listings.

Specified by:
getName in interface Tool

getShortDescription

public String getShortDescription()
Description copied from interface: Tool
1-line description to be used in command listings.

Specified by:
getShortDescription in interface Tool

run

public int run(InputStream ins,
               PrintStream outs,
               PrintStream err,
               List<String> args)
        throws Exception
Description copied from interface: Tool
Runs the tool with supplied arguments. Input and output streams are customizable for easier testing.

Specified by:
run in interface Tool
Parameters:
ins - Input stream to read data (typically System.in).
outs - Output of tool (typically System.out).
err - Error stream (typically System.err).
args - Non-null list of arguments.
Returns:
result code (0 for success)
Throws:
Exception - Just like main(), tools may throw Exception.


Copyright © 2010 The Apache Software Foundation