@InterfaceAudience.Private @InterfaceStability.Unstable public class TaskFinishedEvent extends Object implements HistoryEvent
Constructor and Description |
---|
TaskFinishedEvent(TaskID id,
TaskAttemptID attemptId,
long finishTime,
TaskType taskType,
String status,
Counters counters) |
TaskFinishedEvent(TaskID id,
TaskAttemptID attemptId,
long finishTime,
TaskType taskType,
String status,
Counters counters,
long startTs)
Create an event to record the successful completion of a task.
|
Modifier and Type | Method and Description |
---|---|
Counters |
getCounters()
Gets task counters.
|
Object |
getDatum()
Return the Avro datum wrapped by this.
|
EventType |
getEventType()
Gets event type.
|
long |
getFinishTime()
Gets the task finish time.
|
long |
getStartTime()
Gets the task start time to be reported to ATSv2.
|
TaskAttemptID |
getSuccessfulTaskAttemptId()
Gets successful task attempt id.
|
TaskID |
getTaskId()
Gets task id.
|
String |
getTaskStatus()
Gets task status.
|
TaskType |
getTaskType()
Gets task type.
|
Set<org.apache.hadoop.yarn.api.records.timelineservice.TimelineMetric> |
getTimelineMetrics()
Counters or Metrics if any else return null.
|
void |
setDatum(Object oDatum)
Set the Avro datum wrapped by this.
|
org.apache.hadoop.yarn.api.records.timelineservice.TimelineEvent |
toTimelineEvent()
Map HistoryEvent to TimelineEvent.
|
public TaskFinishedEvent(TaskID id, TaskAttemptID attemptId, long finishTime, TaskType taskType, String status, Counters counters, long startTs)
id
- Task IDattemptId
- Task Attempt ID of the successful attempt for this taskfinishTime
- Finish time of the tasktaskType
- Type of the taskstatus
- Status stringcounters
- Counters for the taskstartTs
- task start timepublic TaskFinishedEvent(TaskID id, TaskAttemptID attemptId, long finishTime, TaskType taskType, String status, Counters counters)
public Object getDatum()
HistoryEvent
getDatum
in interface HistoryEvent
public void setDatum(Object oDatum)
HistoryEvent
setDatum
in interface HistoryEvent
public TaskID getTaskId()
public TaskAttemptID getSuccessfulTaskAttemptId()
public long getFinishTime()
public long getStartTime()
public Counters getCounters()
public TaskType getTaskType()
public String getTaskStatus()
public EventType getEventType()
getEventType
in interface HistoryEvent
public org.apache.hadoop.yarn.api.records.timelineservice.TimelineEvent toTimelineEvent()
HistoryEvent
toTimelineEvent
in interface HistoryEvent
public Set<org.apache.hadoop.yarn.api.records.timelineservice.TimelineMetric> getTimelineMetrics()
HistoryEvent
getTimelineMetrics
in interface HistoryEvent
Copyright © 2018 Apache Software Foundation. All Rights Reserved.