Package org.apache.hadoop.mapreduce
Class JobStatus
java.lang.Object
org.apache.hadoop.mapreduce.JobStatus
- Direct Known Subclasses:
JobStatus
Describes the current status of a job.
-
Nested Class Summary
Nested Classes -
Constructor Summary
ConstructorsConstructorDescriptionJobStatus(JobID jobid, float setupProgress, float mapProgress, float reduceProgress, float cleanupProgress, JobStatus.State runState, JobPriority jp, String user, String jobName, String jobFile, String trackingUrl) Create a job status object for a given jobid.JobStatus(JobID jobid, float setupProgress, float mapProgress, float reduceProgress, float cleanupProgress, JobStatus.State runState, JobPriority jp, String user, String jobName, String queue, String jobFile, String trackingUrl) Create a job status object for a given jobid.JobStatus(JobID jobid, float setupProgress, float mapProgress, float reduceProgress, float cleanupProgress, JobStatus.State runState, JobPriority jp, String user, String jobName, String queue, String jobFile, String trackingUrl, boolean isUber) Create a job status object for a given jobid.JobStatus(JobID jobid, float setupProgress, float mapProgress, float reduceProgress, float cleanupProgress, JobStatus.State runState, JobPriority jp, String user, String jobName, String queue, String jobFile, String trackingUrl, boolean isUber, String historyFile) Create a job status object for a given jobid. -
Method Summary
Modifier and TypeMethodDescriptionclone()floatGets any available info on the reason of failure of the job.longGet the finish time of the job.Map<org.apache.hadoop.mapreduce.JobACL,AccessControlList> Get the job acls.Get the configuration file for the job.getJobID()Get the user-specified job name.floatintintintReturn the priority of the jobgetQueue()Get queue namefloatintGets the Scheduling information associated to a particular Job.floatlonggetState()Get the link to the web-ui for details of the job.intbooleanReturns true if the status is for a completed job.booleanCheck whether the job has retired.booleanisUber()Whether job running in uber modevoidreadFields(DataInput in) Deserialize the fields of this object fromin.protected voidsetCleanupProgress(float p) Sets the cleanup progress of this jobprotected voidsetFailureInfo(String failureInfo) Set diagnostic information.protected voidsetFinishTime(long finishTime) Set the finish time of the jobprotected voidsetHistoryFile(String historyFile) Set the job history file url for a completed jobprotected voidsetJobACLs(Map<org.apache.hadoop.mapreduce.JobACL, AccessControlList> acls) Set the job acls.protected voidsetMapProgress(float p) Sets the map progress of this jobvoidsetNeededMem(int n) voidsetNumReservedSlots(int n) voidsetNumUsedSlots(int n) protected voidSet the priority of the job, defaulting to NORMAL.protected voidSet queue nameprotected voidsetReduceProgress(float p) Sets the reduce progress of this JobvoidsetReservedMem(int r) protected voidSet the job retire flag to true.protected voidsetSchedulingInfo(String schedulingInfo) Used to set the scheduling information associated to a particular Job.protected voidsetSetupProgress(float p) Sets the setup progress of this jobprotected voidsetStartTime(long startTime) Set the start time of the jobprotected voidsetState(JobStatus.State state) Change the current run state of the job.protected voidsetTrackingUrl(String trackingUrl) Set the link to the web-ui for details of the job.voidsetUber(boolean isUber) Set uber-mode flagvoidsetUsedMem(int m) protected voidsetUsername(String userName) toString()voidwrite(DataOutput out) Serialize the fields of this object toout.
-
Constructor Details
-
JobStatus
public JobStatus() -
JobStatus
public JobStatus(JobID jobid, float setupProgress, float mapProgress, float reduceProgress, float cleanupProgress, JobStatus.State runState, JobPriority jp, String user, String jobName, String jobFile, String trackingUrl) Create a job status object for a given jobid.- Parameters:
jobid- The jobid of the jobsetupProgress- The progress made on the setupmapProgress- The progress made on the mapsreduceProgress- The progress made on the reducescleanupProgress- The progress made on the cleanuprunState- The current state of the jobjp- Priority of the job.user- userid of the person who submitted the job.jobName- user-specified job name.jobFile- job configuration file.trackingUrl- link to the web-ui for details of the job.
-
JobStatus
public JobStatus(JobID jobid, float setupProgress, float mapProgress, float reduceProgress, float cleanupProgress, JobStatus.State runState, JobPriority jp, String user, String jobName, String queue, String jobFile, String trackingUrl) Create a job status object for a given jobid.- Parameters:
jobid- The jobid of the jobsetupProgress- The progress made on the setupmapProgress- The progress made on the mapsreduceProgress- The progress made on the reducescleanupProgress- The progress made on the cleanuprunState- The current state of the jobjp- Priority of the job.user- userid of the person who submitted the job.jobName- user-specified job name.queue- queue namejobFile- job configuration file.trackingUrl- link to the web-ui for details of the job.
-
JobStatus
public JobStatus(JobID jobid, float setupProgress, float mapProgress, float reduceProgress, float cleanupProgress, JobStatus.State runState, JobPriority jp, String user, String jobName, String queue, String jobFile, String trackingUrl, boolean isUber) Create a job status object for a given jobid.- Parameters:
jobid- The jobid of the jobsetupProgress- The progress made on the setupmapProgress- The progress made on the mapsreduceProgress- The progress made on the reducescleanupProgress- The progress made on the cleanuprunState- The current state of the jobjp- Priority of the job.user- userid of the person who submitted the job.jobName- user-specified job name.queue- queue namejobFile- job configuration file.trackingUrl- link to the web-ui for details of the job.isUber- Whether job running in uber mode
-
JobStatus
public JobStatus(JobID jobid, float setupProgress, float mapProgress, float reduceProgress, float cleanupProgress, JobStatus.State runState, JobPriority jp, String user, String jobName, String queue, String jobFile, String trackingUrl, boolean isUber, String historyFile) Create a job status object for a given jobid.- Parameters:
jobid- The jobid of the jobsetupProgress- The progress made on the setupmapProgress- The progress made on the mapsreduceProgress- The progress made on the reducescleanupProgress- The progress made on the cleanuprunState- The current state of the jobjp- Priority of the job.user- userid of the person who submitted the job.jobName- user-specified job name.queue- queue namejobFile- job configuration file.trackingUrl- link to the web-ui for details of the job.isUber- Whether job running in uber modehistoryFile- history file
-
-
Method Details
-
setMapProgress
protected void setMapProgress(float p) Sets the map progress of this job- Parameters:
p- The value of map progress to set to
-
setCleanupProgress
protected void setCleanupProgress(float p) Sets the cleanup progress of this job- Parameters:
p- The value of cleanup progress to set to
-
setSetupProgress
protected void setSetupProgress(float p) Sets the setup progress of this job- Parameters:
p- The value of setup progress to set to
-
setReduceProgress
protected void setReduceProgress(float p) Sets the reduce progress of this Job- Parameters:
p- The value of reduce progress to set to
-
setPriority
Set the priority of the job, defaulting to NORMAL.- Parameters:
jp- new job priority
-
setFinishTime
protected void setFinishTime(long finishTime) Set the finish time of the job- Parameters:
finishTime- The finishTime of the job
-
setHistoryFile
Set the job history file url for a completed job -
setTrackingUrl
Set the link to the web-ui for details of the job. -
setRetired
protected void setRetired()Set the job retire flag to true. -
setState
Change the current run state of the job. -
setStartTime
protected void setStartTime(long startTime) Set the start time of the job- Parameters:
startTime- The startTime of the job
-
setUsername
- Parameters:
userName- The username of the job
-
setSchedulingInfo
Used to set the scheduling information associated to a particular Job.- Parameters:
schedulingInfo- Scheduling information of the job
-
setJobACLs
Set the job acls.- Parameters:
acls-MapfromJobACLtoAccessControlList
-
setQueue
Set queue name- Parameters:
queue- queue name
-
setFailureInfo
Set diagnostic information.- Parameters:
failureInfo- diagnostic information
-
getQueue
Get queue name- Returns:
- queue name
-
getMapProgress
public float getMapProgress()- Returns:
- Percentage of progress in maps
-
getCleanupProgress
public float getCleanupProgress()- Returns:
- Percentage of progress in cleanup
-
getSetupProgress
public float getSetupProgress()- Returns:
- Percentage of progress in setup
-
getReduceProgress
public float getReduceProgress()- Returns:
- Percentage of progress in reduce
-
getState
- Returns:
- running state of the job
-
getStartTime
public long getStartTime()- Returns:
- start time of the job
-
clone
-
getJobID
- Returns:
- The jobid of the Job
-
getUsername
- Returns:
- the username of the job
-
getSchedulingInfo
Gets the Scheduling information associated to a particular Job.- Returns:
- the scheduling information of the job
-
getJobACLs
Get the job acls.- Returns:
- a
MapfromJobACLtoAccessControlList
-
getPriority
Return the priority of the job- Returns:
- job priority
-
getFailureInfo
Gets any available info on the reason of failure of the job.- Returns:
- diagnostic information on why a job might have failed.
-
isJobComplete
public boolean isJobComplete()Returns true if the status is for a completed job. -
write
Description copied from interface:WritableSerialize the fields of this object toout.- Specified by:
writein interfaceWritable- Parameters:
out-DataOuputto serialize this object into.- Throws:
IOException- any other problem for write.
-
readFields
Description copied from interface:WritableDeserialize the fields of this object fromin.For efficiency, implementations should attempt to re-use storage in the existing object where possible.
- Specified by:
readFieldsin interfaceWritable- Parameters:
in-DataInputto deseriablize this object from.- Throws:
IOException- any other problem for readFields.
-
getJobName
Get the user-specified job name. -
getJobFile
Get the configuration file for the job. -
getTrackingUrl
Get the link to the web-ui for details of the job. -
getFinishTime
public long getFinishTime()Get the finish time of the job. -
isRetired
public boolean isRetired()Check whether the job has retired. -
getHistoryFile
- Returns:
- the job history file name for a completed job. If job is not completed or history file not available then return null.
-
getNumUsedSlots
public int getNumUsedSlots()- Returns:
- number of used mapred slots
-
setNumUsedSlots
public void setNumUsedSlots(int n) - Parameters:
n- number of used mapred slots
-
getNumReservedSlots
public int getNumReservedSlots()- Returns:
- the number of reserved slots
-
setNumReservedSlots
public void setNumReservedSlots(int n) - Parameters:
n- the number of reserved slots
-
getUsedMem
public int getUsedMem()- Returns:
- the used memory
-
setUsedMem
public void setUsedMem(int m) - Parameters:
m- the used memory
-
getReservedMem
public int getReservedMem()- Returns:
- the reserved memory
-
setReservedMem
public void setReservedMem(int r) - Parameters:
r- the reserved memory
-
getNeededMem
public int getNeededMem()- Returns:
- the needed memory
-
setNeededMem
public void setNeededMem(int n) - Parameters:
n- the needed memory
-
isUber
public boolean isUber()Whether job running in uber mode- Returns:
- job in uber-mode
-
setUber
public void setUber(boolean isUber) Set uber-mode flag- Parameters:
isUber- Whether job running in uber-mode
-
toString
-