public class TaskImpl extends Object implements Task, org.apache.hadoop.yarn.event.EventHandler<TaskEvent>
| Modifier and Type | Field and Description |
|---|---|
protected AppContext |
appContext |
protected org.apache.hadoop.yarn.util.Clock |
clock |
protected org.apache.hadoop.conf.Configuration |
conf |
protected org.apache.hadoop.yarn.event.EventHandler |
eventHandler |
protected int |
maxAttempts |
protected int |
maxFailedAttempts |
protected TaskCommunicatorManagerInterface |
taskCommunicatorManagerInterface |
protected TaskHeartbeatHandler |
taskHeartbeatHandler |
| Constructor and Description |
|---|
TaskImpl(TezVertexID vertexId,
int taskIndex,
org.apache.hadoop.yarn.event.EventHandler eventHandler,
org.apache.hadoop.conf.Configuration conf,
TaskCommunicatorManagerInterface taskCommunicatorManagerInterface,
org.apache.hadoop.yarn.util.Clock clock,
TaskHeartbeatHandler thh,
AppContext appContext,
boolean leafVertex,
org.apache.hadoop.yarn.api.records.Resource resource,
ContainerContext containerContext,
StateChangeNotifier stateChangeNotifier,
Vertex vertex) |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitgetVertexIDgetDAGIDgetApplicationIdprotected final org.apache.hadoop.conf.Configuration conf
protected final TaskCommunicatorManagerInterface taskCommunicatorManagerInterface
protected final TaskHeartbeatHandler taskHeartbeatHandler
protected final org.apache.hadoop.yarn.event.EventHandler eventHandler
protected final int maxFailedAttempts
protected final int maxAttempts
protected final org.apache.hadoop.yarn.util.Clock clock
protected final AppContext appContext
public TaskImpl(TezVertexID vertexId, int taskIndex, org.apache.hadoop.yarn.event.EventHandler eventHandler, org.apache.hadoop.conf.Configuration conf, TaskCommunicatorManagerInterface taskCommunicatorManagerInterface, org.apache.hadoop.yarn.util.Clock clock, TaskHeartbeatHandler thh, AppContext appContext, boolean leafVertex, org.apache.hadoop.yarn.api.records.Resource resource, ContainerContext containerContext, StateChangeNotifier stateChangeNotifier, Vertex vertex)
public Map<TezTaskAttemptID,TaskAttempt> getAttempts()
getAttempts in interface Taskpublic TaskAttempt getAttempt(TezTaskAttemptID attemptID)
getAttempt in interface Taskpublic TezTaskID getTaskID()
getTaskID in interface TaskIDAwarepublic boolean isFinished()
TaskisFinished in interface Taskpublic TaskReport getReport()
public TezCounters getCounters()
getCounters in interface Taskpublic float getProgress()
getProgress in interface Taskpublic ArrayList<TezEvent> getTaskAttemptTezEvents(TezTaskAttemptID attemptID, int fromEventId, int maxEvents)
getTaskAttemptTezEvents in interface Taskpublic TaskSpec getBaseTaskSpec()
getBaseTaskSpec in interface Taskpublic TaskLocationHint getTaskLocationHint()
getTaskLocationHint in interface Taskpublic List<String> getDiagnostics()
getDiagnostics in interface Taskpublic long getFinishTime()
getFinishTime in interface Taskpublic Set<org.apache.hadoop.yarn.api.records.NodeId> getNodesWithRunningAttempts()
getNodesWithRunningAttempts in interface Taskpublic TaskStateInternal getInternalState()
public boolean canCommit(TezTaskAttemptID taskAttemptID)
Taskpublic TaskAttempt getSuccessfulAttempt()
getSuccessfulAttempt in interface Taskpublic void handle(TaskEvent event)
handle in interface org.apache.hadoop.yarn.event.EventHandler<TaskEvent>protected void internalError(TaskEventType type)
protected void internalErrorUncaughtException(TaskEventType type, Exception e)
protected String getSplitsAsString()
protected void logJobHistoryTaskStartedEvent()
protected void logJobHistoryTaskFinishedEvent()
protected void logJobHistoryTaskFailedEvent(TaskState finalState)
public void registerTezEvent(TezEvent tezEvent)
registerTezEvent in interface Taskpublic long getFirstAttemptStartTime()
getFirstAttemptStartTime in interface TaskCopyright © 2022 Apache Software Foundation. All rights reserved.