org.apache.tez.dag.app.dag
Interface Task

All Known Implementing Classes:
TaskImpl

public interface Task

Read only view of Task.


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()
           
 org.apache.tez.dag.records.TezTaskAttemptID getOutputConsumableAttempt()
          Get the attempt id which has reported in as output ready.
 float getProgress()
           
 TaskReport getReport()
           
 TaskState getState()
           
 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()
           
 boolean isFinished()
          Has Task reached the final state or not.
 boolean needsWaitAfterOutputConsumable()
          Do the running tasks need to stick around after they're done processing and generating output.
 TaskState restoreFromEvent(HistoryEvent historyEvent)
           
 

Method Detail

getTaskId

org.apache.tez.dag.records.TezTaskID getTaskId()

getReport

TaskReport getReport()

getState

TaskState getState()

getCounters

org.apache.tez.common.counters.TezCounters getCounters()

getProgress

float getProgress()

getAttempts

Map<org.apache.tez.dag.records.TezTaskAttemptID,TaskAttempt> getAttempts()

getAttempt

TaskAttempt getAttempt(org.apache.tez.dag.records.TezTaskAttemptID attemptID)

isFinished

boolean isFinished()
Has Task reached the final state or not.


canCommit

boolean canCommit(org.apache.tez.dag.records.TezTaskAttemptID taskAttemptID)
Can the output of the taskAttempt be committed. Note that once the task gives a go for a commit, further canCommit requests from any other attempts should return false.

Parameters:
taskAttemptID -
Returns:
whether the attempt's output can be committed or not.

needsWaitAfterOutputConsumable

boolean needsWaitAfterOutputConsumable()
Do the running tasks need to stick around after they're done processing and generating output. Required for tasks which have custom output handling such as in-memory shuffle.

Returns:
whether the task needs to stick around.

getOutputConsumableAttempt

org.apache.tez.dag.records.TezTaskAttemptID getOutputConsumableAttempt()
Get the attempt id which has reported in as output ready. null if not applicable.

Returns:
the attempt id which has reported in as output ready. null if not applicable.

getVertex

Vertex getVertex()

getTaskAttemptTezEvents

List<org.apache.tez.runtime.api.impl.TezEvent> getTaskAttemptTezEvents(org.apache.tez.dag.records.TezTaskAttemptID attemptID,
                                                                       int fromEventId,
                                                                       int maxEvents)

getDiagnostics

List<String> getDiagnostics()

restoreFromEvent

TaskState restoreFromEvent(HistoryEvent historyEvent)


Copyright © 2014 Apache Software Foundation. All rights reserved.