org.apache.hadoop.mapreduce
Class JobStatus

java.lang.Object
  extended by org.apache.hadoop.mapreduce.JobStatus
All Implemented Interfaces:
Cloneable, Writable
Direct Known Subclasses:
JobStatus

@InterfaceAudience.Public
@InterfaceStability.Evolving
public class JobStatus
extends Object
implements Writable, Cloneable

Describes the current status of a job.


Constructor Summary
JobStatus()
           
JobStatus(JobID jobid, float setupProgress, float mapProgress, float reduceProgress, float cleanupProgress, org.apache.hadoop.mapreduce.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, org.apache.hadoop.mapreduce.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, org.apache.hadoop.mapreduce.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.
 
Method Summary
 Object clone()
           
 float getCleanupProgress()
           
 String getFailureInfo()
          Gets any available info on the reason of failure of the job.
 long getFinishTime()
          Get the finish time of the job.
 String getHistoryFile()
           
 Map<org.apache.hadoop.mapreduce.JobACL,org.apache.hadoop.security.authorize.AccessControlList> getJobACLs()
          Get the job acls.
 String getJobFile()
          Get the configuration file for the job.
 JobID getJobID()
           
 String getJobName()
          Get the user-specified job name.
 float getMapProgress()
           
 int getNeededMem()
           
 int getNumReservedSlots()
           
 int getNumUsedSlots()
           
 JobPriority getPriority()
          Return the priority of the job
 String getQueue()
          Get queue name
 float getReduceProgress()
           
 int getReservedMem()
           
 String getSchedulingInfo()
          Gets the Scheduling information associated to a particular Job.
 float getSetupProgress()
           
 long getStartTime()
           
 org.apache.hadoop.mapreduce.JobStatus.State getState()
           
 String getTrackingUrl()
          Get the link to the web-ui for details of the job.
 int getUsedMem()
           
 String getUsername()
           
 boolean isJobComplete()
          Returns true if the status is for a completed job.
 boolean isRetired()
          Check whether the job has retired.
 boolean isUber()
          Whether job running in uber mode
 void readFields(DataInput in)
          Deserialize the fields of this object from in.
protected  void setCleanupProgress(float p)
          Sets the cleanup progress of this job
protected  void setFailureInfo(String failureInfo)
          Set diagnostic information.
protected  void setFinishTime(long finishTime)
          Set the finish time of the job
protected  void setHistoryFile(String historyFile)
          Set the job history file url for a completed job
protected  void setJobACLs(Map<org.apache.hadoop.mapreduce.JobACL,org.apache.hadoop.security.authorize.AccessControlList> acls)
          Set the job acls.
protected  void setMapProgress(float p)
          Sets the map progress of this job
 void setNeededMem(int n)
           
 void setNumReservedSlots(int n)
           
 void setNumUsedSlots(int n)
           
protected  void setPriority(JobPriority jp)
          Set the priority of the job, defaulting to NORMAL.
protected  void setQueue(String queue)
          Set queue name
protected  void setReduceProgress(float p)
          Sets the reduce progress of this Job
 void setReservedMem(int r)
           
protected  void setRetired()
          Set the job retire flag to true.
protected  void setSchedulingInfo(String schedulingInfo)
          Used to set the scheduling information associated to a particular Job.
protected  void setSetupProgress(float p)
          Sets the setup progress of this job
protected  void setStartTime(long startTime)
          Set the start time of the job
protected  void setState(org.apache.hadoop.mapreduce.JobStatus.State state)
          Change the current run state of the job.
protected  void setTrackingUrl(String trackingUrl)
          Set the link to the web-ui for details of the job.
 void setUber(boolean isUber)
          Set uber-mode flag
 void setUsedMem(int m)
           
protected  void setUsername(String userName)
           
 String toString()
           
 void write(DataOutput out)
          Serialize the fields of this object to out.
 
Methods inherited from class java.lang.Object
equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Constructor Detail

JobStatus

public JobStatus()

JobStatus

public JobStatus(JobID jobid,
                 float setupProgress,
                 float mapProgress,
                 float reduceProgress,
                 float cleanupProgress,
                 org.apache.hadoop.mapreduce.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 job
setupProgress - The progress made on the setup
mapProgress - The progress made on the maps
reduceProgress - The progress made on the reduces
cleanupProgress - The progress made on the cleanup
runState - The current state of the job
jp - 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,
                 org.apache.hadoop.mapreduce.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 job
setupProgress - The progress made on the setup
mapProgress - The progress made on the maps
reduceProgress - The progress made on the reduces
cleanupProgress - The progress made on the cleanup
runState - The current state of the job
jp - Priority of the job.
user - userid of the person who submitted the job.
jobName - user-specified job name.
queue - queue 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,
                 org.apache.hadoop.mapreduce.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 job
setupProgress - The progress made on the setup
mapProgress - The progress made on the maps
reduceProgress - The progress made on the reduces
cleanupProgress - The progress made on the cleanup
runState - The current state of the job
jp - Priority of the job.
user - userid of the person who submitted the job.
jobName - user-specified job name.
queue - queue name
jobFile - job configuration file.
trackingUrl - link to the web-ui for details of the job.
isUber - Whether job running in uber mode
Method Detail

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

protected void setPriority(JobPriority jp)
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

protected void setHistoryFile(String historyFile)
Set the job history file url for a completed job


setTrackingUrl

protected void setTrackingUrl(String trackingUrl)
Set the link to the web-ui for details of the job.


setRetired

protected void setRetired()
Set the job retire flag to true.


setState

protected void setState(org.apache.hadoop.mapreduce.JobStatus.State state)
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

protected void setUsername(String userName)
Parameters:
userName - The username of the job

setSchedulingInfo

protected void setSchedulingInfo(String schedulingInfo)
Used to set the scheduling information associated to a particular Job.

Parameters:
schedulingInfo - Scheduling information of the job

setJobACLs

protected void setJobACLs(Map<org.apache.hadoop.mapreduce.JobACL,org.apache.hadoop.security.authorize.AccessControlList> acls)
Set the job acls.

Parameters:
acls - Map from JobACL to AccessControlList

setQueue

protected void setQueue(String queue)
Set queue name

Parameters:
queue - queue name

setFailureInfo

protected void setFailureInfo(String failureInfo)
Set diagnostic information.

Parameters:
failureInfo - diagnostic information

getQueue

public String 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

public org.apache.hadoop.mapreduce.JobStatus.State getState()
Returns:
running state of the job

getStartTime

public long getStartTime()
Returns:
start time of the job

clone

public Object clone()
Overrides:
clone in class Object

getJobID

public JobID getJobID()
Returns:
The jobid of the Job

getUsername

public String getUsername()
Returns:
the username of the job

getSchedulingInfo

public String getSchedulingInfo()
Gets the Scheduling information associated to a particular Job.

Returns:
the scheduling information of the job

getJobACLs

public Map<org.apache.hadoop.mapreduce.JobACL,org.apache.hadoop.security.authorize.AccessControlList> getJobACLs()
Get the job acls.

Returns:
a Map from JobACL to AccessControlList

getPriority

public JobPriority getPriority()
Return the priority of the job

Returns:
job priority

getFailureInfo

public String 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

public void write(DataOutput out)
           throws IOException
Description copied from interface: Writable
Serialize the fields of this object to out.

Specified by:
write in interface Writable
Parameters:
out - DataOuput to serialize this object into.
Throws:
IOException

readFields

public void readFields(DataInput in)
                throws IOException
Description copied from interface: Writable
Deserialize the fields of this object from in.

For efficiency, implementations should attempt to re-use storage in the existing object where possible.

Specified by:
readFields in interface Writable
Parameters:
in - DataInput to deseriablize this object from.
Throws:
IOException

getJobName

public String getJobName()
Get the user-specified job name.


getJobFile

public String getJobFile()
Get the configuration file for the job.


getTrackingUrl

public String 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

public String 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

public String toString()
Overrides:
toString in class Object


Copyright © 2012 Apache Software Foundation. All Rights Reserved.