public class ControlledJob
extends java.lang.Object
Modifier and Type | Class and Description |
---|---|
static class |
ControlledJob.State |
Constructor and Description |
---|
ControlledJob(org.apache.hadoop.conf.Configuration conf)
Construct a job.
|
ControlledJob(Job job,
java.util.List<ControlledJob> dependingJobs)
Construct a job.
|
Modifier and Type | Method and Description |
---|---|
boolean |
addDependingJob(ControlledJob dependingJob)
Add a job to this jobs' dependency list.
|
java.util.List<ControlledJob> |
getDependentJobs() |
Job |
getJob() |
java.lang.String |
getJobID() |
java.lang.String |
getJobName() |
ControlledJob.State |
getJobState() |
JobID |
getMapredJobID() |
java.lang.String |
getMessage() |
boolean |
isCompleted() |
boolean |
isReady() |
void |
killJob() |
void |
setJob(Job job)
Set the mapreduce job
|
void |
setJobID(java.lang.String id)
Set the job ID for this job.
|
void |
setJobName(java.lang.String jobName)
Set the job name for this job.
|
protected void |
setJobState(ControlledJob.State state)
Set the state for this job.
|
void |
setMessage(java.lang.String message)
Set the message for this job.
|
protected void |
submit()
Submit this job to mapred.
|
java.lang.String |
toString() |
public ControlledJob(Job job, java.util.List<ControlledJob> dependingJobs) throws java.io.IOException
job
- a mapreduce job to be executed.dependingJobs
- an array of jobs the current job depends onjava.io.IOException
public ControlledJob(org.apache.hadoop.conf.Configuration conf) throws java.io.IOException
conf
- mapred job configuration representing a job to be executed.java.io.IOException
public java.lang.String toString()
toString
in class java.lang.Object
public java.lang.String getJobName()
public void setJobName(java.lang.String jobName)
jobName
- the job namepublic java.lang.String getJobID()
public void setJobID(java.lang.String id)
id
- the job IDpublic JobID getMapredJobID()
public Job getJob()
public void setJob(Job job)
job
- the mapreduce job for this job.public ControlledJob.State getJobState()
protected void setJobState(ControlledJob.State state)
state
- the new state for this job.public java.lang.String getMessage()
public void setMessage(java.lang.String message)
message
- the message for this job.public java.util.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 java.io.IOException, java.lang.InterruptedException
java.io.IOException
java.lang.InterruptedException
protected void submit()
Copyright © 2009 The Apache Software Foundation