Overview | Package | Class | Use | Tree | Deprecated | Index | Help
PREV CLASS NEXT CLASS | FRAMES NO FRAMES
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD

## org.apache.hadoop.mapred
Class JobStatus

    java.lang.Object
      org.apache.hadoop.mapred.JobStatus

All Implemented Interfaces:
  Cloneable, Writable

    public class JobStatus

extends Object
implements Writable, Cloneable

Describes the current status of a job.

See Also:
  `for some more information.`

Field Summary
`static int` | `FAILED`
`static int` | `KILLED`
`static int` | `PREP`
`static int` | `RUNNING`
`static int` | `SUCCEEDED`

Constructor Summary
`JobStatus()`
`JobStatus(JobID jobid, float setupProgress, float mapProgress, float reduceProgress, float cleanupProgress, int runState, JobPriority jp)` Create a job status object for a given jobid.
`JobStatus(JobID jobid, float mapProgress, float reduceProgress, float cleanupProgress, int runState)` Create a job status object for a given jobid.
`JobStatus(JobID jobid, float mapProgress, float reduceProgress, float cleanupProgress, int runState, JobPriority jp)` Create a job status object for a given jobid.
`JobStatus(JobID jobid, float mapProgress, float reduceProgress, int runState)` Create a job status object for a given jobid.

Method Summary
`float` | `cleanupProgress()`
`Object` | `clone()`
`String` | `getFailureInfo()` gets any available info on the reason of failure of the job.
`Map<JobACL,AccessControlList>` | `getJobACLs()` Get the acls for Job.
`String` | `getJobId()` Deprecated. use getJobID instead
`JobID` | `getJobID()`
`JobPriority` | `getJobPriority()` Return the priority of the job
`static String` | `getJobRunState(int state)` Helper method to get human-readable state of the job.
`int` | `getRunState()`
`String` | `getSchedulingInfo()` Gets the Scheduling information associated to a particular Job.
`long` | `getStartTime()`
`String` | `getUsername()`
`boolean` | `isJobComplete()` Returns true if the status is for a completed job.
`float` | `mapProgress()`
`void` | `readFields(DataInput in)` Deserialize the fields of this object from `in`.
`float` | `reduceProgress()`
`void` | `setFailureInfo(String failureInfo)` set the reason for failuire of this job
`protected void` | `setJobACLs(Map<JobACL,AccessControlList> acls)` Set the job acls
`void` | `setJobPriority(JobPriority jp)` Set the priority of the job, defaulting to NORMAL.
`void` | `setRunState(int state)` Change the current run state of the job.
`void` | `setSchedulingInfo(String schedulingInfo)` Used to set the scheduling information associated to a particular Job.
`float` | `setupProgress()`
`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, 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

### KILLED

    public static final int KILLED

See Also:
  Constant Field Values

Constructor Detail

### JobStatus

    public JobStatus()

### JobStatus

    public JobStatus(JobID jobid,
                     float mapProgress,
                     float reduceProgress,
                     float cleanupProgress,
                     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
    `cleanupProgress` - The progress made on cleanup
    `runState` - The current state of the job

### 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

### JobStatus

    public JobStatus(JobID jobid,
                     float mapProgress,
                     float reduceProgress,
                     float cleanupProgress,
                     int runState,
                     JobPriority jp)

  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
    `jp` - Priority of the job.

### JobStatus

    public JobStatus(JobID jobid,
                     float setupProgress,
                     float mapProgress,
                     float reduceProgress,
                     float cleanupProgress,
                     int runState,
                     JobPriority jp)

  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.

Method Detail

### getJobRunState

    public static String getJobRunState(int state)

  Helper method to get human-readable state of the job.

  Parameters:
    `state` - job state
  Returns:
    human-readable state of the job

### 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

### setJobACLs

    protected void setJobACLs(Map<JobACL,AccessControlList> acls)

  Set the job acls

  Parameters:
    `acls` - `Map` from `JobACL` to `AccessControlList`

### cleanupProgress

    public float cleanupProgress()

  Returns:
    Percentage of progress in cleanup

### setupProgress

    public float setupProgress()

  Returns:
    Percentage of progress in setup

### 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

### clone

    public Object clone()

  Overrides:
    `clone` in class `Object`

### 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

### 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.

### setFailureInfo

    public void setFailureInfo(String failureInfo)

  set the reason for failuire of this job

  Parameters:
    `failureInfo` - the reason for failure of this job.

### setSchedulingInfo

    public void setSchedulingInfo(String schedulingInfo)

  Used to set the scheduling information associated to a particular Job.

  Parameters:
    `schedulingInfo` - Scheduling information of the job

### getJobACLs

    public Map<JobACL,AccessControlList> getJobACLs()

  Get the acls for Job.

  Returns:
    a `Map` from `JobACL` to `AccessControlList`

### getJobPriority

    public JobPriority getJobPriority()

  Return the priority of the job

  Returns:
    job priority

### setJobPriority

    public void setJobPriority(JobPriority jp)

  Set the priority of the job, defaulting to NORMAL.

  Parameters:
    `jp` - new job priority

### 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`

Overview | Package | Class | Use | Tree | Deprecated | Index | Help
PREV CLASS NEXT CLASS | FRAMES NO FRAMES
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD

Copyright © 2009 The Apache Software Foundation