限定符和类型 | 类和说明 |
---|---|
static class |
TaskCompletionEvent.Status |
限定符和类型 | 字段和说明 |
---|---|
static TaskCompletionEvent[] |
EMPTY_ARRAY |
构造器和说明 |
---|
TaskCompletionEvent()
Default constructor for Writable.
|
TaskCompletionEvent(int eventId,
TaskAttemptID taskId,
int idWithinJob,
boolean isMap,
TaskCompletionEvent.Status status,
String taskTrackerHttp)
Constructor. eventId should be created externally and incremented
per event for each job.
|
限定符和类型 | 方法和说明 |
---|---|
boolean |
equals(Object o) |
int |
getEventId()
Returns event Id.
|
TaskAttemptID |
getTaskAttemptId()
Returns task id.
|
String |
getTaskId()
已过时。
use
getTaskAttemptId() instead. |
int |
getTaskRunTime()
Returns time (in millisec) the task took to complete.
|
TaskCompletionEvent.Status |
getTaskStatus()
Returns enum Status.SUCESS or Status.FAILURE.
|
String |
getTaskTrackerHttp()
http location of the tasktracker where this task ran.
|
int |
hashCode() |
int |
idWithinJob() |
boolean |
isMapTask() |
void |
readFields(DataInput in)
Deserialize the fields of this object from
in . |
void |
setEventId(int eventId)
set event Id. should be assigned incrementally starting from 0.
|
void |
setTaskId(String taskId)
已过时。
use
setTaskID(TaskAttemptID) instead. |
void |
setTaskID(TaskAttemptID taskId)
Sets task id.
|
void |
setTaskRunTime(int taskCompletionTime)
Set the task completion time
|
void |
setTaskStatus(TaskCompletionEvent.Status status)
Set task status.
|
void |
setTaskTrackerHttp(String taskTrackerHttp)
Set task tracker http location.
|
String |
toString() |
void |
write(DataOutput out)
Serialize the fields of this object to
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()
@Deprecated public String getTaskId()
getTaskAttemptId()
instead.public TaskAttemptID getTaskAttemptId()
public TaskCompletionEvent.Status getTaskStatus()
public String getTaskTrackerHttp()
public int getTaskRunTime()
public void setTaskRunTime(int taskCompletionTime)
taskCompletionTime
- time (in millisec) the task took to completepublic void setEventId(int eventId)
eventId
- @Deprecated public void setTaskId(String taskId)
setTaskID(TaskAttemptID)
instead.taskId
- public void setTaskID(TaskAttemptID taskId)
taskId
- public void setTaskStatus(TaskCompletionEvent.Status status)
status
- public void setTaskTrackerHttp(String taskTrackerHttp)
taskTrackerHttp
- public boolean isMapTask()
public int idWithinJob()
public void write(DataOutput out) throws IOException
Writable
out
.write
在接口中 Writable
out
- DataOuput
to serialize this object into.IOException
public void readFields(DataInput in) throws IOException
Writable
in
.
For efficiency, implementations should attempt to re-use storage in the existing object where possible.
readFields
在接口中 Writable
in
- DataInput
to deseriablize this object from.IOException
Copyright © 2009 The Apache Software Foundation