org.apache.hadoop.mapreduce
Class TaskReport

java.lang.Object
  extended by org.apache.hadoop.mapreduce.TaskReport
All Implemented Interfaces:
org.apache.hadoop.io.Writable
Direct Known Subclasses:
TaskReport

@InterfaceAudience.Private
@InterfaceStability.Evolving
public class TaskReport
extends Object
implements org.apache.hadoop.io.Writable

A report on the state of a task.


Constructor Summary
TaskReport()
           
TaskReport(TaskID taskid, float progress, String state, String[] diagnostics, TIPStatus currentStatus, long startTime, long finishTime, Counters counters)
          Creates a new TaskReport object
 
Method Summary
 boolean equals(Object o)
           
 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> getRunningTaskAttemptIds()
          Get the running task attempt IDs for this task
 long getStartTime()
          Get start time of task.
 String getState()
          The most recent state, reported by the Reporter.
 TaskAttemptID getSuccessfulTaskAttemptId()
          Get the attempt ID that took this task to completion
 Counters getTaskCounters()
          A table of counters.
 TaskID getTaskId()
          The id of the task.
 int hashCode()
           
 void readFields(DataInput in)
           
protected  void setFinishTime(long finishTime)
          set finish time of task.
protected  void setRunningTaskAttemptIds(Collection<TaskAttemptID> runningAttempts)
          set running attempt(s) of the task.
protected  void setStartTime(long startTime)
          set start time of the task.
protected  void setSuccessfulAttemptId(TaskAttemptID t)
          set successful attempt ID of the task.
 void write(DataOutput out)
           
 
Methods inherited from class java.lang.Object
clone, finalize, getClass, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

TaskReport

public TaskReport()

TaskReport

public TaskReport(TaskID taskid,
                  float progress,
                  String state,
                  String[] diagnostics,
                  TIPStatus currentStatus,
                  long startTime,
                  long finishTime,
                  Counters counters)
Creates a new TaskReport object

Parameters:
taskid -
progress -
state -
diagnostics -
currentStatus -
startTime -
finishTime -
counters -
Method Detail

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 the Reporter.


getDiagnostics

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


getTaskCounters

public Counters getTaskCounters()
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.

setFinishTime

protected void setFinishTime(long finishTime)
set finish time of task.

Parameters:
finishTime - finish time of task.

getStartTime

public long getStartTime()
Get start time of task.

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

setStartTime

protected void setStartTime(long startTime)
set start time of the task.


setSuccessfulAttemptId

protected void setSuccessfulAttemptId(TaskAttemptID t)
set successful attempt ID of the task.


getSuccessfulTaskAttemptId

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


setRunningTaskAttemptIds

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


getRunningTaskAttemptIds

public Collection<TaskAttemptID> getRunningTaskAttemptIds()
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
Specified by:
write in interface org.apache.hadoop.io.Writable
Throws:
IOException

readFields

public void readFields(DataInput in)
                throws IOException
Specified by:
readFields in interface org.apache.hadoop.io.Writable
Throws:
IOException


Copyright © 2012 Apache Software Foundation. All Rights Reserved.