@InterfaceAudience.Private @InterfaceStability.Unstable public class TaskAttemptFinishedEvent extends Object implements HistoryEvent
Constructor and Description |
---|
TaskAttemptFinishedEvent(TaskAttemptID id,
TaskType taskType,
String taskStatus,
long finishTime,
String rackName,
String hostname,
String state,
Counters counters) |
TaskAttemptFinishedEvent(TaskAttemptID id,
TaskType taskType,
String taskStatus,
long finishTime,
String rackName,
String hostname,
String state,
Counters counters,
long startTs)
Create an event to record successful finishes for setup and cleanup
attempts.
|
Modifier and Type | Method and Description |
---|---|
TaskAttemptID |
getAttemptId()
Gets the task attempt id.
|
Object |
getDatum()
Return the Avro datum wrapped by this.
|
EventType |
getEventType()
Gets the event type.
|
long |
getFinishTime()
Gets the attempt finish time.
|
String |
getHostname()
Gets the host where the attempt executed.
|
String |
getRackName()
Gets the rackname where the attempt executed.
|
long |
getStartTime()
Gets the task attempt start time to be used while publishing to ATSv2.
|
String |
getState()
Gets the state string.
|
TaskID |
getTaskId()
Gets the task ID.
|
String |
getTaskStatus()
Gets the task status.
|
TaskType |
getTaskType()
Gets the 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 TaskAttemptFinishedEvent(TaskAttemptID id, TaskType taskType, String taskStatus, long finishTime, String rackName, String hostname, String state, Counters counters, long startTs)
id
- Attempt IDtaskType
- Type of tasktaskStatus
- Status of taskfinishTime
- Finish time of attempthostname
- Host where the attempt executedstate
- State stringcounters
- Counters for the attemptstartTs
- Task start time to be used for writing entity to ATSv2.public Object getDatum()
HistoryEvent
getDatum
in interface HistoryEvent
public void setDatum(Object oDatum)
HistoryEvent
setDatum
in interface HistoryEvent
public TaskID getTaskId()
public TaskAttemptID getAttemptId()
public TaskType getTaskType()
public String getTaskStatus()
public long getFinishTime()
public long getStartTime()
public String getHostname()
public String getRackName()
public String getState()
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 © 2020 Apache Software Foundation. All rights reserved.