org.apache.tez.dag.app.dag.impl
Class TaskAttemptImpl
java.lang.Object
org.apache.tez.dag.app.dag.impl.TaskAttemptImpl
- All Implemented Interfaces:
- org.apache.hadoop.yarn.event.EventHandler<TaskAttemptEvent>, TaskAttempt
public class TaskAttemptImpl
- extends Object
- implements TaskAttempt, org.apache.hadoop.yarn.event.EventHandler<TaskAttemptEvent>
|
Constructor Summary |
TaskAttemptImpl(org.apache.tez.dag.records.TezTaskID taskId,
int attemptNumber,
org.apache.hadoop.yarn.event.EventHandler eventHandler,
TaskAttemptListener taskAttemptListener,
org.apache.hadoop.conf.Configuration conf,
org.apache.hadoop.yarn.util.Clock clock,
TaskHeartbeatHandler taskHeartbeatHandler,
AppContext appContext,
org.apache.tez.dag.api.VertexLocationHint.TaskLocationHint locationHint,
boolean isRescheduled,
org.apache.hadoop.yarn.api.records.Resource resource,
ContainerContext containerContext,
boolean leafVertex)
|
conf
protected final org.apache.hadoop.conf.Configuration conf
eventHandler
protected org.apache.hadoop.yarn.event.EventHandler eventHandler
appContext
protected final AppContext appContext
locationHint
protected final org.apache.tez.dag.api.VertexLocationHint.TaskLocationHint locationHint
isRescheduled
protected final boolean isRescheduled
FAILED_HELPER
protected static final TaskAttemptImpl.FailedTransitionHelper FAILED_HELPER
KILLED_HELPER
protected static final TaskAttemptImpl.KilledTransitionHelper KILLED_HELPER
TaskAttemptImpl
public TaskAttemptImpl(org.apache.tez.dag.records.TezTaskID taskId,
int attemptNumber,
org.apache.hadoop.yarn.event.EventHandler eventHandler,
TaskAttemptListener taskAttemptListener,
org.apache.hadoop.conf.Configuration conf,
org.apache.hadoop.yarn.util.Clock clock,
TaskHeartbeatHandler taskHeartbeatHandler,
AppContext appContext,
org.apache.tez.dag.api.VertexLocationHint.TaskLocationHint locationHint,
boolean isRescheduled,
org.apache.hadoop.yarn.api.records.Resource resource,
ContainerContext containerContext,
boolean leafVertex)
getID
public org.apache.tez.dag.records.TezTaskAttemptID getID()
- Specified by:
getID in interface TaskAttempt
getTaskID
public org.apache.tez.dag.records.TezTaskID getTaskID()
- Specified by:
getTaskID in interface TaskAttempt
getVertexID
public org.apache.tez.dag.records.TezVertexID getVertexID()
- Specified by:
getVertexID in interface TaskAttempt
getDAGID
public org.apache.tez.dag.records.TezDAGID getDAGID()
- Specified by:
getDAGID in interface TaskAttempt
getReport
public TaskAttemptReport getReport()
- Specified by:
getReport in interface TaskAttempt
getDiagnostics
public List<String> getDiagnostics()
- Specified by:
getDiagnostics in interface TaskAttempt
getCounters
public org.apache.tez.common.counters.TezCounters getCounters()
- Specified by:
getCounters in interface TaskAttempt
getProgress
public float getProgress()
- Specified by:
getProgress in interface TaskAttempt
getState
public TaskAttemptState getState()
- Specified by:
getState in interface TaskAttempt
getStateNoLock
public TaskAttemptState getStateNoLock()
- Specified by:
getStateNoLock in interface TaskAttempt
isFinished
public boolean isFinished()
- Description copied from interface:
TaskAttempt
- Has attempt reached the final state or not.
- Specified by:
isFinished in interface TaskAttempt
- Returns:
- true if it has finished, else false
getAssignedContainerID
public org.apache.hadoop.yarn.api.records.ContainerId getAssignedContainerID()
- Specified by:
getAssignedContainerID in interface TaskAttempt
- Returns:
- the container ID if a container is assigned, otherwise null.
getAssignedContainerMgrAddress
public String getAssignedContainerMgrAddress()
- Specified by:
getAssignedContainerMgrAddress in interface TaskAttempt
- Returns:
- container mgr address if a container is assigned, otherwise null.
getNodeId
public org.apache.hadoop.yarn.api.records.NodeId getNodeId()
- Specified by:
getNodeId in interface TaskAttempt
- Returns:
- node's id if a container is assigned, otherwise null.
getNodeHttpAddress
public String getNodeHttpAddress()
- If container Assigned then return the node's address, otherwise null.
- Specified by:
getNodeHttpAddress in interface TaskAttempt
- Returns:
- node's http address if a container is assigned, otherwise null.
getNodeRackName
public String getNodeRackName()
- If container Assigned then return the node's rackname, otherwise null.
- Specified by:
getNodeRackName in interface TaskAttempt
- Returns:
- node's rack name if a container is assigned, otherwise null.
getLaunchTime
public long getLaunchTime()
- Specified by:
getLaunchTime in interface TaskAttempt
- Returns:
- time at which container is launched. If container is not launched
yet, returns 0.
getFinishTime
public long getFinishTime()
- Specified by:
getFinishTime in interface TaskAttempt
- Returns:
- attempt's finish time. If attempt is not finished
yet, returns 0.
getTask
public Task getTask()
- Specified by:
getTask in interface TaskAttempt
handle
public void handle(TaskAttemptEvent event)
- Specified by:
handle in interface org.apache.hadoop.yarn.event.EventHandler<TaskAttemptEvent>
getInternalState
public TaskAttemptStateInternal getInternalState()
getIsRescheduled
public boolean getIsRescheduled()
- Specified by:
getIsRescheduled in interface TaskAttempt
restoreFromEvent
public TaskAttemptState restoreFromEvent(HistoryEvent historyEvent)
- Specified by:
restoreFromEvent in interface TaskAttempt
resolveHosts
protected String[] resolveHosts(String[] src)
logJobHistoryAttemptStarted
protected void logJobHistoryAttemptStarted()
logJobHistoryAttemptFinishedEvent
protected void logJobHistoryAttemptFinishedEvent(TaskAttemptStateInternal state)
logJobHistoryAttemptUnsuccesfulCompletion
protected void logJobHistoryAttemptUnsuccesfulCompletion(TaskAttemptState state)
sendInputFailedToConsumers
protected void sendInputFailedToConsumers()
toString
public String toString()
- Overrides:
toString in class Object
Copyright © 2014 Apache Software Foundation. All rights reserved.