|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object org.apache.hadoop.mapred.jobcontrol.Job
public class Job
This class encapsulates a MapReduce job and its dependency. It monitors the states of the depending jobs and updates the state of this job. A job stats in the WAITING state. If it does not have any deoending jobs, or all of the depending jobs are in SUCCESS state, then the job state will become READY. If any depending jobs fail, the job will fail too. When in READY state, the job can be submitted to Hadoop for execution, with the state changing into RUNNING state. From RUNNING state, the job can get into SUCCESS or FAILED state, depending the status of the jon execution.
Field Summary | |
---|---|
static int |
DEPENDENT_FAILED
|
static int |
FAILED
|
static int |
READY
|
static int |
RUNNING
|
static int |
SUCCESS
|
static int |
WAITING
|
Constructor Summary | |
---|---|
Job(JobConf jobConf,
ArrayList dependingJobs)
Construct a job. |
Method Summary | |
---|---|
int |
checkState()
Check and update the state of this job. |
ArrayList |
getDependingJobs()
|
JobConf |
getJobConf()
|
String |
getJobID()
|
String |
getJobName()
|
String |
getMapredJobID()
|
String |
getMessage()
|
int |
getState()
|
boolean |
isCompleted()
|
boolean |
isReady()
|
static void |
main(String[] args)
|
void |
setJobConf(JobConf jobConf)
Set the mapred job conf for this job. |
void |
setJobID(String id)
Set the job ID for this job. |
void |
setJobName(String jobName)
Set the job name for this job. |
void |
setMapredJobID(String mapredJobID)
Set the mapred ID for this job. |
void |
setMessage(String message)
Set the message for this job. |
void |
setState(int state)
Set the state for this job. |
void |
submit()
Submit this job to mapred. |
String |
toString()
|
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait |
Field Detail |
---|
public static final int SUCCESS
public static final int WAITING
public static final int RUNNING
public static final int READY
public static final int FAILED
public static final int DEPENDENT_FAILED
Constructor Detail |
---|
public Job(JobConf jobConf, ArrayList dependingJobs) throws IOException
jobConf
- a mapred job configuration representing a job to be executed.dependingJobs
- an array of jobs the current job depends on
IOException
Method Detail |
---|
public String toString()
toString
in class Object
public String getJobName()
public void setJobName(String jobName)
jobName
- the job namepublic String getJobID()
public void setJobID(String id)
id
- the job IDpublic String getMapredJobID()
public void setMapredJobID(String mapredJobID)
mapredJobID
- the mapred job ID for this job.public JobConf getJobConf()
public void setJobConf(JobConf jobConf)
jobConf
- the mapred job conf for this job.public int getState()
public void setState(int state)
state
- the new state for this job.public String getMessage()
public void setMessage(String message)
message
- the message for this job.public ArrayList getDependingJobs()
public boolean isCompleted()
public boolean isReady()
public int checkState()
public void submit()
public static void main(String[] args)
args
-
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |