p2pMapReduce.mapreduceModule
Class JobStatus

java.lang.Object
  extended by p2pMapReduce.mapreduceModule.JobStatus
All Implemented Interfaces:
java.io.Serializable, java.lang.Cloneable

public class JobStatus
extends java.lang.Object
implements java.io.Serializable, java.lang.Cloneable

Describes the current status of a job.

See Also:
Serialized Form

Nested Class Summary
static class JobStatus.State
          Current state of the job
 
Constructor Summary
JobStatus()
           
JobStatus(JobID jobid, float setupProgress, float mapProgress, float reduceProgress, float cleanupProgress, JobStatus.State runState, java.lang.String user, java.lang.String jobName, java.lang.String jobFile, java.lang.String trackingUrl)
          Create a job status object for a given jobid.
 
Method Summary
 java.lang.Object clone()
           
 float getCleanupProgress()
           
 long getFinishTime()
          Get the finish time of the job.
 java.lang.String getHistoryFile()
           
 java.lang.String getJobFile()
          Get the configuration file for the job.
 JobID getJobID()
           
 java.lang.String getJobName()
          Get the user-specified job name.
 float getMapProgress()
           
 float getReduceProgress()
           
 java.lang.String getSchedulingInfo()
          Gets the Scheduling information associated to a particular Job.
 float getSetupProgress()
           
 long getStartTime()
           
 JobStatus.State getState()
           
 java.lang.String getTrackingUrl()
          Get the link to the web-ui for details of the job.
 java.lang.String getUsername()
           
 boolean isJobComplete()
          Returns true if the status is for a completed job.
 boolean isRetired()
          Check whether the job has retired.
protected  void setCleanupProgress(float p)
          Sets the cleanup progress of this job
protected  void setFinishTime(long finishTime)
          Set the finish time of the job
protected  void setHistoryFile(java.lang.String historyFile)
          Set the job history file url for a completed job
 void setMapProgress(float p)
          Sets the map progress of this job
 void setReduceProgress(float p)
          Sets the reduce progress of this Job
protected  void setRetired()
          Set the job retire flag to true.
protected  void setSchedulingInfo(java.lang.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(JobStatus.State state)
          Change the current run state of the job.
protected  void setTrackingUrl(java.lang.String trackingUrl)
          Set the link to the web-ui for details of the job.
protected  void setUsername(java.lang.String userName)
           
 java.lang.String toString()
           
 
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,
                 JobStatus.State runState,
                 java.lang.String user,
                 java.lang.String jobName,
                 java.lang.String jobFile,
                 java.lang.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.
Method Detail

setMapProgress

public 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

public void setReduceProgress(float p)
Sets the reduce progress of this Job

Parameters:
p - The value of reduce progress to set to

setFinishTime

protected void setFinishTime(long finishTime)
Set the finish time of the job

Parameters:
finishTime - The finishTime of the job

setHistoryFile

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


setTrackingUrl

protected void setTrackingUrl(java.lang.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(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(java.lang.String userName)
Parameters:
userName - The username of the job

setSchedulingInfo

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

Parameters:
schedulingInfo - Scheduling information of the job

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 JobStatus.State getState()
Returns:
running state of the job

getStartTime

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

clone

public java.lang.Object clone()
Overrides:
clone in class java.lang.Object

getJobID

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

getUsername

public java.lang.String getUsername()
Returns:
the username of the job

getSchedulingInfo

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

Returns:
the scheduling information of the job

isJobComplete

public boolean isJobComplete()
Returns true if the status is for a completed job.


getJobName

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


getJobFile

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


getTrackingUrl

public java.lang.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 java.lang.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.

toString

public java.lang.String toString()
Overrides:
toString in class java.lang.Object