@InterfaceAudience.Public @InterfaceStability.Evolving public class TaskCompletionEvent extends Object implements org.apache.hadoop.io.Writable
| Modifier and Type | Class and Description | 
|---|---|
| static class  | TaskCompletionEvent.Status | 
| Modifier and Type | Field and Description | 
|---|---|
| static TaskCompletionEvent[] | EMPTY_ARRAY | 
| Constructor and Description | 
|---|
| TaskCompletionEvent()Default constructor for Writable. | 
| TaskCompletionEvent(int eventId,
                   TaskAttemptID taskId,
                   int idWithinJob,
                   boolean isMap,
                   TaskCompletionEvent.Status status,
                   String taskTrackerHttp)Constructor. | 
| Modifier and Type | Method and Description | 
|---|---|
| boolean | equals(Object o) | 
| int | getEventId()Returns event Id. | 
| TaskCompletionEvent.Status | getStatus()Returns  TaskCompletionEvent.Status | 
| TaskAttemptID | getTaskAttemptId()Returns task id. | 
| int | getTaskRunTime()Returns time (in millisec) the task took to complete. | 
| String | getTaskTrackerHttp()http location of the tasktracker where this task ran. | 
| int | hashCode() | 
| int | idWithinJob() | 
| boolean | isMapTask() | 
| void | readFields(DataInput in) | 
| protected void | setEventId(int eventId)set event Id. | 
| protected void | setTaskAttemptId(TaskAttemptID taskId)Sets task id. | 
| protected void | setTaskRunTime(int taskCompletionTime)Set the task completion time | 
| protected void | setTaskStatus(TaskCompletionEvent.Status status)Set task status. | 
| protected void | setTaskTrackerHttp(String taskTrackerHttp)Set task tracker http location. | 
| String | toString() | 
| void | write(DataOutput out) | 
public static final TaskCompletionEvent[] EMPTY_ARRAY
public TaskCompletionEvent()
public TaskCompletionEvent(int eventId,
                           TaskAttemptID taskId,
                           int idWithinJob,
                           boolean isMap,
                           TaskCompletionEvent.Status status,
                           String taskTrackerHttp)
eventId - event id, event id should be unique and assigned in
  incrementally, starting from 0.taskId - task idstatus - task's statustaskTrackerHttp - task tracker's host:port for http.public int getEventId()
public TaskAttemptID getTaskAttemptId()
public TaskCompletionEvent.Status getStatus()
TaskCompletionEvent.Statuspublic String getTaskTrackerHttp()
public int getTaskRunTime()
protected void setTaskRunTime(int taskCompletionTime)
taskCompletionTime - time (in millisec) the task took to completeprotected void setEventId(int eventId)
eventId - protected void setTaskAttemptId(TaskAttemptID taskId)
taskId - protected void setTaskStatus(TaskCompletionEvent.Status status)
status - protected void setTaskTrackerHttp(String taskTrackerHttp)
taskTrackerHttp - public boolean isMapTask()
public int idWithinJob()
public void write(DataOutput out) throws IOException
write in interface org.apache.hadoop.io.WritableIOExceptionpublic void readFields(DataInput in) throws IOException
readFields in interface org.apache.hadoop.io.WritableIOExceptionCopyright © 2008–2018 Apache Software Foundation. All rights reserved.