Class Job
java.lang.Object
org.apache.hadoop.mapreduce.lib.jobcontrol.ControlledJob
org.apache.hadoop.mapred.jobcontrol.Job
-
Nested Class Summary
Nested classes/interfaces inherited from class org.apache.hadoop.mapreduce.lib.jobcontrol.ControlledJob
ControlledJob.State -
Field Summary
FieldsModifier and TypeFieldDescriptionstatic final intstatic final intstatic final intstatic final intstatic final intstatic final intFields inherited from class org.apache.hadoop.mapreduce.lib.jobcontrol.ControlledJob
CREATE_DIR -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionbooleanaddDependingJob(Job dependingJob) Add a job to this jobs' dependency list.intgetState()voidsetAssignedJobID(JobID mapredJobID) Deprecated.setAssignedJobID should not be called.voidsetJobConf(JobConf jobConf) Set the mapred job conf for this job.voidsetMapredJobID(String mapredJobID) Deprecated.protected voidsetState(int state) Deprecated.Methods inherited from class org.apache.hadoop.mapreduce.lib.jobcontrol.ControlledJob
addDependingJob, failJob, getDependentJobs, getJob, getJobID, getJobName, getJobState, getMapredJobId, getMessage, isCompleted, isReady, killJob, setJob, setJobID, setJobName, setJobState, setMessage, submit, toString
-
Field Details
-
SUCCESS
public static final int SUCCESS- See Also:
-
WAITING
public static final int WAITING- See Also:
-
RUNNING
public static final int RUNNING- See Also:
-
READY
public static final int READY- See Also:
-
FAILED
public static final int FAILED- See Also:
-
DEPENDENT_FAILED
public static final int DEPENDENT_FAILED- See Also:
-
-
Constructor Details
-
Job
Construct a job.- Parameters:
jobConf- a mapred job configuration representing a job to be executed.dependingJobs- an array of jobs the current job depends on- Throws:
IOException
-
Job
- Throws:
IOException
-
-
Method Details
-
getAssignedJobID
- Returns:
- the mapred ID of this job as assigned by the mapred framework.
-
setAssignedJobID
Deprecated.setAssignedJobID should not be called. JOBID is set by the framework. -
getJobConf
- Returns:
- the mapred job conf of this job
-
setJobConf
Set the mapred job conf for this job.- Parameters:
jobConf- the mapred job conf for this job.
-
getState
public int getState()- Returns:
- the state of this job
-
setState
Deprecated.This is a no-op function, Its a behavior change from 1.x We no more can change the state from job- Parameters:
state- the new state for this job.
-
addDependingJob
Add a job to this jobs' dependency list. Dependent jobs can only be added while a Job is waiting to run, not during or afterwards.- Parameters:
dependingJob- Job that this Job depends on.- Returns:
trueif the Job was added.
-
getJobClient
- Returns:
- the job client of this job
-
getDependingJobs
- Returns:
- the depending jobs of this job
-
getMapredJobID
- Returns:
- the mapred ID of this job as assigned by the mapred framework.
-
setMapredJobID
Deprecated.This is no-op method for backward compatibility. It's a behavior change from 1.x, we can not change job ids from job.- Parameters:
mapredJobID- the mapred job ID for this job.
-