Package org.apache.avro.mapred.tether

# Class TetherJob

java.lang.Object
org.apache.hadoop.conf.Configured
org.apache.avro.mapred.tether.TetherJob

All Implemented Interfaces:
  `Configurable`

public class TetherJob extends Configured
Constructs and submits tether jobs. This may be used as an API-based method to launch tether jobs.

## Field Summary

Fields
Modifier and Type
Field
Description
`static final String`
`TETHER_EXEC`
`static final String`
`TETHER_EXEC_ARGS`
`static final String`
`TETHER_EXEC_CACHED`
`static final String`
`TETHER_PROTOCOL`

## Constructor Summary

Constructors
Constructor
Description
`TetherJob()`

## Method Summary

Modifier and Type
Method
Description
`static URI`
`getExecutable(JobConf job)`
Get the URI of the application's executable.
`static org.apache.avro.mapred.tether.TetheredProcess.Protocol`
`getProtocol(JobConf job)`
Extract from the job configuration file an instance of the TRANSPROTO enumeration to represent the protocol to use for the communication
`static RunningJob`
`runJob(JobConf job)`
Submit a job to the map/reduce cluster.
`static void`
`setExecutable(JobConf job, File executable)`
Set the URI for the application's executable.
`static void`
`setExecutable(JobConf job, File executable, List<String> args, boolean cached)`
Set the URI for the application's executable (i.e the program to run in a subprocess and provides the mapper/reducer).
`static void`
`setProtocol(JobConf job, String proto)`
Determines which transport protocol (e.g http or sasl) used to communicate between the parent and subprocess
`static RunningJob`
`submitJob(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`

## Field Details

### TETHER_EXEC

public static final String TETHER_EXEC

See Also:
  - Constant Field Values

### TETHER_EXEC_ARGS

public static final String TETHER_EXEC_ARGS

See Also:
  - Constant Field Values

### TETHER_EXEC_CACHED

public static final String TETHER_EXEC_CACHED

See Also:
  - Constant Field Values

### TETHER_PROTOCOL

public static final String TETHER_PROTOCOL

See Also:
  - Constant Field Values

## Constructor Details

### TetherJob

public TetherJob()

## Method Details

### getExecutable

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

### setExecutable

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

### setExecutable

public static void setExecutable(JobConf job, File executable, List<String> args, boolean cached)
Set the URI for the application's executable (i.e the program to run in a subprocess and provides the mapper/reducer).

Parameters:
  `job` - - Job
  `executable` - - The URI of the executable
  `args` - - List of additional arguments; Null if no arguments
  `cached` - - If true, the executable URI is cached using DistributedCache - if false its not cached. I.e if the file is already stored on each local file system or if its on a NFS share

### getProtocol

public static org.apache.avro.mapred.tether.TetheredProcess.Protocol getProtocol(JobConf job)
Extract from the job configuration file an instance of the TRANSPROTO enumeration to represent the protocol to use for the communication

Parameters:
  `job` -
Returns:
  - Get the currently used protocol

### runJob

public static RunningJob runJob(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 RunningJob submitJob(JobConf conf) throws IOException
Submit a job to the Map-Reduce framework.

Throws:
  `IOException`

### setProtocol

public static void setProtocol(JobConf job, String proto) throws IOException
Determines which transport protocol (e.g http or sasl) used to communicate between the parent and subprocess

Parameters:
  `job` - - job configuration
  `proto` - - String identifying the protocol currently http or sasl
Throws:
  `IOException`