|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object org.apache.hadoop.util.ToolBase org.apache.hadoop.mapred.JobClient
public class JobClient
JobClient interacts with the JobTracker network interface. This object implements the job-control interface, and should be the primary method by which user programs interact with the networked job system.
Nested Class Summary | |
---|---|
static class |
JobClient.TaskStatusFilter
|
Field Summary | |
---|---|
static int |
FILE_NOT_FOUND
|
static long |
HEARTBEAT_INTERVAL
|
static String |
MAP_OUTPUT_LENGTH
The custom http header used for the map output length. |
static float |
MAX_INMEM_FILESIZE_FRACTION
Constant denoting the max size (in terms of the fraction of the total size of the filesys) of a map output file that we will try to keep in mem. |
static float |
MAX_INMEM_FILESYS_USE
Constant denoting when a merge of in memory files will be triggered |
static int |
SUCCESS
|
Fields inherited from class org.apache.hadoop.util.ToolBase |
---|
conf |
Constructor Summary | |
---|---|
JobClient()
Build a job client, connect to the default job tracker |
|
JobClient(Configuration conf)
|
|
JobClient(InetSocketAddress jobTrackAddr,
Configuration conf)
Build a job client, connect to the indicated job tracker. |
Method Summary | |
---|---|
void |
close()
|
ClusterStatus |
getClusterStatus()
|
FileSystem |
getFs()
Get a filesystem handle. |
RunningJob |
getJob(String jobid)
Get an RunningJob object to track an ongoing job. |
TaskReport[] |
getMapTaskReports(String jobId)
Get the information of the current state of the map tasks of a job. |
TaskReport[] |
getReduceTaskReports(String jobId)
Get the information of the current state of the reduce tasks of a job. |
JobClient.TaskStatusFilter |
getTaskOutputFilter()
Deprecated. |
static JobClient.TaskStatusFilter |
getTaskOutputFilter(JobConf job)
Get the task output filter out of the JobConf |
void |
init()
|
JobStatus[] |
jobsToComplete()
|
static void |
main(String[] argv)
|
int |
run(String[] argv)
execute the command with the given arguments |
static RunningJob |
runJob(JobConf job)
Utility that submits a job, then polls for progress until the job is complete. |
void |
setTaskOutputFilter(JobClient.TaskStatusFilter newValue)
Deprecated. |
static void |
setTaskOutputFilter(JobConf job,
JobClient.TaskStatusFilter newValue)
Modify the JobConf to set the task output filter |
RunningJob |
submitJob(JobConf job)
Submit a job to the MR system |
RunningJob |
submitJob(String jobFile)
Submit a job to the MR system |
Methods inherited from class org.apache.hadoop.util.ToolBase |
---|
doMain, getConf, setConf |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Field Detail |
---|
public static final long HEARTBEAT_INTERVAL
public static final float MAX_INMEM_FILESYS_USE
public static final float MAX_INMEM_FILESIZE_FRACTION
public static final int SUCCESS
public static final int FILE_NOT_FOUND
public static final String MAP_OUTPUT_LENGTH
Constructor Detail |
---|
public JobClient()
public JobClient(Configuration conf) throws IOException
IOException
public JobClient(InetSocketAddress jobTrackAddr, Configuration conf) throws IOException
IOException
Method Detail |
---|
public void init() throws IOException
IOException
public void close() throws IOException
IOException
public FileSystem getFs() throws IOException
IOException
public RunningJob submitJob(String jobFile) throws FileNotFoundException, InvalidJobConfException, IOException
FileNotFoundException
InvalidJobConfException
IOException
public RunningJob submitJob(JobConf job) throws FileNotFoundException, InvalidJobConfException, IOException
FileNotFoundException
InvalidJobConfException
IOException
public RunningJob getJob(String jobid) throws IOException
IOException
public TaskReport[] getMapTaskReports(String jobId) throws IOException
jobId
- the job to query
IOException
public TaskReport[] getReduceTaskReports(String jobId) throws IOException
jobId
- the job to query
IOException
public ClusterStatus getClusterStatus() throws IOException
IOException
public JobStatus[] jobsToComplete() throws IOException
IOException
public static RunningJob runJob(JobConf job) throws IOException
IOException
@Deprecated public void setTaskOutputFilter(JobClient.TaskStatusFilter newValue)
newValue
- task filter.public static JobClient.TaskStatusFilter getTaskOutputFilter(JobConf job)
job
- the JobConf to examine
public static void setTaskOutputFilter(JobConf job, JobClient.TaskStatusFilter newValue)
job
- the JobConf to modifynewValue
- the value to set@Deprecated public JobClient.TaskStatusFilter getTaskOutputFilter()
public int run(String[] argv) throws Exception
Tool
run
in interface Tool
argv
- command specific arguments
Exception
public static void main(String[] argv) throws Exception
Exception
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |