| 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 TaskAttemptListener |
taskAttemptListener |
protected TaskHeartbeatHandler |
taskHeartbeatHandler |
| Constructor and Description |
|---|
TaskImpl(org.apache.tez.dag.records.TezVertexID vertexId,
int taskIndex,
org.apache.hadoop.yarn.event.EventHandler eventHandler,
org.apache.hadoop.conf.Configuration conf,
TaskAttemptListener taskAttemptListener,
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) |
| Modifier and Type | Method and Description |
|---|---|
boolean |
canCommit(org.apache.tez.dag.records.TezTaskAttemptID taskAttemptID)
Can the output of the taskAttempt be committed.
|
TaskAttempt |
getAttempt(org.apache.tez.dag.records.TezTaskAttemptID attemptID) |
Map<org.apache.tez.dag.records.TezTaskAttemptID,TaskAttempt> |
getAttempts() |
org.apache.tez.common.counters.TezCounters |
getCounters() |
List<String> |
getDiagnostics() |
TaskStateInternal |
getInternalState() |
org.apache.tez.dag.records.TezTaskAttemptID |
getOutputConsumableAttempt()
Get the attempt id which has reported in as output ready.
|
float |
getProgress() |
TaskReport |
getReport() |
protected String |
getSplitsAsString() |
TaskState |
getState() |
TaskAttempt |
getSuccessfulAttempt() |
List<org.apache.tez.runtime.api.impl.TezEvent> |
getTaskAttemptTezEvents(org.apache.tez.dag.records.TezTaskAttemptID attemptID,
int fromEventId,
int maxEvents) |
org.apache.tez.dag.records.TezTaskID |
getTaskId() |
Vertex |
getVertex() |
void |
handle(TaskEvent event) |
protected void |
internalError(TaskEventType type) |
boolean |
isFinished()
Has Task reached the final state or not.
|
protected void |
logJobHistoryTaskFailedEvent(TaskState finalState) |
protected void |
logJobHistoryTaskFinishedEvent() |
protected void |
logJobHistoryTaskStartedEvent() |
boolean |
needsWaitAfterOutputConsumable()
Do the running tasks need to stick around after they're done processing and
generating output.
|
void |
registerTezEvent(org.apache.tez.runtime.api.impl.TezEvent tezEvent) |
TaskState |
restoreFromEvent(HistoryEvent historyEvent) |
protected final org.apache.hadoop.conf.Configuration conf
protected final TaskAttemptListener taskAttemptListener
protected final TaskHeartbeatHandler taskHeartbeatHandler
protected final org.apache.hadoop.yarn.event.EventHandler eventHandler
protected final org.apache.hadoop.yarn.util.Clock clock
protected final AppContext appContext
public TaskImpl(org.apache.tez.dag.records.TezVertexID vertexId,
int taskIndex,
org.apache.hadoop.yarn.event.EventHandler eventHandler,
org.apache.hadoop.conf.Configuration conf,
TaskAttemptListener taskAttemptListener,
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)
public Map<org.apache.tez.dag.records.TezTaskAttemptID,TaskAttempt> getAttempts()
getAttempts in interface Taskpublic TaskAttempt getAttempt(org.apache.tez.dag.records.TezTaskAttemptID attemptID)
getAttempt in interface Taskpublic org.apache.tez.dag.records.TezTaskID getTaskId()
public boolean isFinished()
TaskisFinished in interface Taskpublic TaskReport getReport()
public org.apache.tez.common.counters.TezCounters getCounters()
getCounters in interface Taskpublic float getProgress()
getProgress in interface Taskpublic List<org.apache.tez.runtime.api.impl.TezEvent> getTaskAttemptTezEvents(org.apache.tez.dag.records.TezTaskAttemptID attemptID, int fromEventId, int maxEvents)
getTaskAttemptTezEvents in interface Taskpublic List<String> getDiagnostics()
getDiagnostics in interface Taskpublic TaskState restoreFromEvent(HistoryEvent historyEvent)
restoreFromEvent in interface Taskpublic TaskStateInternal getInternalState()
public boolean canCommit(org.apache.tez.dag.records.TezTaskAttemptID taskAttemptID)
Taskpublic boolean needsWaitAfterOutputConsumable()
TaskneedsWaitAfterOutputConsumable in interface Taskpublic org.apache.tez.dag.records.TezTaskAttemptID getOutputConsumableAttempt()
TaskgetOutputConsumableAttempt in interface 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 String getSplitsAsString()
protected void logJobHistoryTaskStartedEvent()
protected void logJobHistoryTaskFinishedEvent()
protected void logJobHistoryTaskFailedEvent(TaskState finalState)
public void registerTezEvent(org.apache.tez.runtime.api.impl.TezEvent tezEvent)
registerTezEvent in interface TaskCopyright © 2014 Apache Software Foundation. All rights reserved.