org.apache.hadoop.mapred
Class TaskReport

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

public class TaskReport
extends Object
implements Writable

A report on the state of a task.


Constructor Summary
TaskReport()
           
 
Method Summary
 boolean equals(Object o)
           
 Counters getCounters()
          A table of counters.
 TIPStatus getCurrentStatus()
          The current status
 String[] getDiagnostics()
          A list of error messages.
 long getFinishTime()
          Get finish time of task.
 float getProgress()
          The amount completed, between zero and one.
 Collection<TaskAttemptID> getRunningTaskAttempts()
          Get the running task attempt IDs for this task
 long getStartTime()
          Get start time of task.
 String getState()
          The most recent state, reported by a Reporter.
 TaskAttemptID getSuccessfulTaskAttempt()
          Get the attempt ID that took this task to completion
 String getTaskId()
          Deprecated. use getTaskID() instead
 TaskID getTaskID()
          The id of the task.
 int hashCode()
           
 void readFields(DataInput in)
          Deserialize the fields of this object from in.
 void setRunningTaskAttempts(Collection<TaskAttemptID> runningAttempts)
          set running attempt(s) of the task.
 void setSuccessfulAttempt(TaskAttemptID t)
          set successful attempt ID of the task.
 void write(DataOutput out)
          Serialize the fields of this object to out.
 
Methods inherited from class java.lang.Object
clone, finalize, getClass, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

TaskReport

public TaskReport()
Method Detail

getTaskId

@Deprecated
public String getTaskId()
Deprecated. use getTaskID() instead


getTaskID

public TaskID getTaskID()
The id of the task.


getProgress

public float getProgress()
The amount completed, between zero and one.


getState

public String getState()
The most recent state, reported by a Reporter.


getDiagnostics

public String[] getDiagnostics()
A list of error messages.


getCounters

public Counters getCounters()
A table of counters.


getCurrentStatus

public TIPStatus getCurrentStatus()
The current status


getFinishTime

public long getFinishTime()
Get finish time of task.

Returns:
0, if finish time was not set else returns finish time.

getStartTime

public long getStartTime()
Get start time of task.

Returns:
0 if start time was not set, else start time.

setSuccessfulAttempt

public void setSuccessfulAttempt(TaskAttemptID t)
set successful attempt ID of the task.


getSuccessfulTaskAttempt

public TaskAttemptID getSuccessfulTaskAttempt()
Get the attempt ID that took this task to completion


setRunningTaskAttempts

public void setRunningTaskAttempts(Collection<TaskAttemptID> runningAttempts)
set running attempt(s) of the task.


getRunningTaskAttempts

public Collection<TaskAttemptID> getRunningTaskAttempts()
Get the running task attempt IDs for this task


equals

public boolean equals(Object o)
Overrides:
equals in class Object

hashCode

public int hashCode()
Overrides:
hashCode in class Object

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 © 2009 The Apache Software Foundation