@InterfaceAudience.Public @InterfaceStability.Evolving public class ControlledJob extends Object
Modifier and Type | Field and Description |
---|---|
static String |
CREATE_DIR |
Constructor and Description |
---|
ControlledJob(Configuration conf)
Construct a job.
|
ControlledJob(Job job,
List<ControlledJob> dependingJobs)
Construct a job.
|
Modifier and Type | Method and Description |
---|---|
boolean |
addDependingJob(ControlledJob dependingJob)
Add a job to this jobs' dependency list.
|
void |
failJob(String message) |
List<ControlledJob> |
getDependentJobs() |
Job |
getJob() |
String |
getJobID() |
String |
getJobName() |
org.apache.hadoop.mapreduce.lib.jobcontrol.ControlledJob.State |
getJobState() |
JobID |
getMapredJobId() |
String |
getMessage() |
boolean |
isCompleted() |
boolean |
isReady() |
void |
killJob() |
void |
setJob(Job job)
Set the mapreduce job
|
void |
setJobID(String id)
Set the job ID for this job.
|
void |
setJobName(String jobName)
Set the job name for this job.
|
protected void |
setJobState(org.apache.hadoop.mapreduce.lib.jobcontrol.ControlledJob.State state)
Set the state for this job.
|
void |
setMessage(String message)
Set the message for this job.
|
protected void |
submit()
Submit this job to mapred.
|
String |
toString() |
public static final String CREATE_DIR
public ControlledJob(Job job, List<ControlledJob> dependingJobs) throws IOException
job
- a mapreduce job to be executed.dependingJobs
- an array of jobs the current job depends onIOException
public ControlledJob(Configuration conf) throws IOException
conf
- mapred job configuration representing a job to be executed.IOException
public String getJobName()
public void setJobName(String jobName)
jobName
- the job namepublic String getJobID()
public void setJobID(String id)
id
- the job IDpublic JobID getMapredJobId()
public Job getJob()
public void setJob(Job job)
job
- the mapreduce job for this job.public org.apache.hadoop.mapreduce.lib.jobcontrol.ControlledJob.State getJobState()
protected void setJobState(org.apache.hadoop.mapreduce.lib.jobcontrol.ControlledJob.State state)
state
- the new state for this job.public String getMessage()
public void setMessage(String message)
message
- the message for this job.public List<ControlledJob> getDependentJobs()
public boolean addDependingJob(ControlledJob dependingJob)
dependingJob
- Job that this Job depends on.public boolean isCompleted()
public boolean isReady()
public void killJob() throws IOException, InterruptedException
IOException
InterruptedException
public void failJob(String message) throws IOException, InterruptedException
IOException
InterruptedException
protected void submit()
Copyright © 2021 Apache Software Foundation. All rights reserved.