@InterfaceAudience.Public @InterfaceStability.Evolving public class JobControl extends Object implements Runnable
Constructor and Description |
---|
JobControl(String groupName)
Construct a job control for a group of jobs.
|
Modifier and Type | Method and Description |
---|---|
String |
addJob(ControlledJob aJob)
Add a new controlled job.
|
String |
addJob(Job aJob)
Add a new job.
|
void |
addJobCollection(Collection<ControlledJob> jobs)
Add a collection of jobs
|
boolean |
allFinished() |
List<ControlledJob> |
getFailedJobList() |
List<ControlledJob> |
getReadyJobsList() |
List<ControlledJob> |
getRunningJobList() |
List<ControlledJob> |
getSuccessfulJobList() |
org.apache.hadoop.mapreduce.lib.jobcontrol.JobControl.ThreadState |
getThreadState() |
List<ControlledJob> |
getWaitingJobList() |
void |
resume()
resume the suspended thread
|
void |
run()
The main loop for the thread.
|
void |
stop()
set the thread state to STOPPING so that the
thread will stop when it wakes up.
|
void |
suspend()
suspend the running thread
|
public JobControl(String groupName)
groupName
- a name identifying this grouppublic List<ControlledJob> getWaitingJobList()
public List<ControlledJob> getRunningJobList()
public List<ControlledJob> getReadyJobsList()
public List<ControlledJob> getSuccessfulJobList()
public List<ControlledJob> getFailedJobList()
public String addJob(ControlledJob aJob)
aJob
- the new controlled jobpublic void addJobCollection(Collection<ControlledJob> jobs)
jobs
- public org.apache.hadoop.mapreduce.lib.jobcontrol.JobControl.ThreadState getThreadState()
public void stop()
public void suspend()
public void resume()
public boolean allFinished()
Copyright © 2020 Apache Software Foundation. All rights reserved.