org.apache.hadoop.mapred
Class JobStatus

java.lang.Object
  extended by org.apache.hadoop.mapred.JobStatus
All Implemented Interfaces:
Writable

public class JobStatus
extends Object
implements Writable

Describes the current status of a job. This is not intended to be a comprehensive piece of data. For that, look at JobProfile.


Field Summary
static int FAILED
           
static int PREP
           
static int RUNNING
           
static int SUCCEEDED
           
 
Constructor Summary
JobStatus()
           
JobStatus(JobID jobid, float mapProgress, float reduceProgress, int runState)
          Create a job status object for a given jobid.
JobStatus(String jobid, float mapProgress, float reduceProgress, int runState)
          Deprecated. 
 
Method Summary
 String getJobId()
          Deprecated. use getJobID instead
 JobID getJobID()
           
 int getRunState()
           
 long getStartTime()
           
 String getUsername()
           
 float mapProgress()
           
 void readFields(DataInput in)
          Deserialize the fields of this object from in.
 float reduceProgress()
           
 void setRunState(int state)
          Change the current run state of the job.
 void write(DataOutput out)
          Serialize the fields of this object to out.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

RUNNING

public static final int RUNNING
See Also:
Constant Field Values

SUCCEEDED

public static final int SUCCEEDED
See Also:
Constant Field Values

FAILED

public static final int FAILED
See Also:
Constant Field Values

PREP

public static final int PREP
See Also:
Constant Field Values
Constructor Detail

JobStatus

public JobStatus()

JobStatus

@Deprecated
public JobStatus(String jobid,
                            float mapProgress,
                            float reduceProgress,
                            int runState)
Deprecated. 


JobStatus

public JobStatus(JobID jobid,
                 float mapProgress,
                 float reduceProgress,
                 int runState)
Create a job status object for a given jobid.

Parameters:
jobid - The jobid of the job
mapProgress - The progress made on the maps
reduceProgress - The progress made on the reduces
runState - The current state of the job
Method Detail

getJobId

@Deprecated
public String getJobId()
Deprecated. use getJobID instead


getJobID

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

mapProgress

public float mapProgress()
Returns:
Percentage of progress in maps

reduceProgress

public float reduceProgress()
Returns:
Percentage of progress in reduce

getRunState

public int getRunState()
Returns:
running state of the job

setRunState

public void setRunState(int state)
Change the current run state of the job.


getStartTime

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

getUsername

public String getUsername()
Returns:
the username of the 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


Copyright © 2008 The Apache Software Foundation