|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectorg.apache.tez.dag.app.dag.impl.TaskImpl
public class TaskImpl
Implementation of Task interface.
| Field Summary | |
|---|---|
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 org.apache.tez.dag.api.VertexLocationHint.TaskLocationHint |
locationHint
|
protected TaskAttemptListener |
taskAttemptListener
|
protected TaskHeartbeatHandler |
taskHeartbeatHandler
|
| Constructor Summary | |
|---|---|
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.tez.dag.api.VertexLocationHint.TaskLocationHint locationHint,
org.apache.hadoop.yarn.api.records.Resource resource,
ContainerContext containerContext)
|
|
| Method Summary | |
|---|---|
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()
|
protected 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. |
TaskState |
restoreFromEvent(HistoryEvent historyEvent)
|
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Field Detail |
|---|
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
protected org.apache.tez.dag.api.VertexLocationHint.TaskLocationHint locationHint
| Constructor Detail |
|---|
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.tez.dag.api.VertexLocationHint.TaskLocationHint locationHint,
org.apache.hadoop.yarn.api.records.Resource resource,
ContainerContext containerContext)
| Method Detail |
|---|
public TaskState getState()
getState in interface Taskpublic 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 Vertex getVertex()
getVertex in interface Taskpublic org.apache.tez.dag.records.TezTaskID getTaskId()
getTaskId in interface Taskpublic boolean isFinished()
Task
isFinished in interface Taskpublic TaskReport getReport()
getReport in interface Taskpublic org.apache.tez.common.counters.TezCounters getCounters()
getCounters in interface Taskpublic float getProgress()
getProgress in interface Task
public 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)
Task
canCommit in interface Taskpublic boolean needsWaitAfterOutputConsumable()
Task
needsWaitAfterOutputConsumable in interface Taskpublic org.apache.tez.dag.records.TezTaskAttemptID getOutputConsumableAttempt()
Task
getOutputConsumableAttempt in interface Taskprotected TaskAttempt getSuccessfulAttempt()
public 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)
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||