Interface Task

All Known Implementing Classes:
MapTaskImpl, ReduceTaskImpl, TaskImpl

public interface Task
Read only view of Task.
  • Method Summary

    Modifier and Type
    Method
    Description
    boolean
    canCommit(org.apache.hadoop.mapreduce.v2.api.records.TaskAttemptId taskAttemptID)
    Can the output of the taskAttempt be committed.
    getAttempt(org.apache.hadoop.mapreduce.v2.api.records.TaskAttemptId attemptID)
     
    Map<org.apache.hadoop.mapreduce.v2.api.records.TaskAttemptId,TaskAttempt>
     
    org.apache.hadoop.mapreduce.Counters
     
    org.apache.hadoop.mapreduce.v2.api.records.TaskId
     
    float
     
    org.apache.hadoop.mapreduce.v2.api.records.TaskReport
     
    org.apache.hadoop.mapreduce.v2.api.records.TaskState
     
    org.apache.hadoop.mapreduce.v2.api.records.TaskType
     
    boolean
    Has Task reached the final state or not.
  • Method Details

    • getID

      org.apache.hadoop.mapreduce.v2.api.records.TaskId getID()
    • getReport

      org.apache.hadoop.mapreduce.v2.api.records.TaskReport getReport()
    • getState

      org.apache.hadoop.mapreduce.v2.api.records.TaskState getState()
    • getCounters

      org.apache.hadoop.mapreduce.Counters getCounters()
    • getProgress

      float getProgress()
    • getType

      org.apache.hadoop.mapreduce.v2.api.records.TaskType getType()
    • getAttempts

      Map<org.apache.hadoop.mapreduce.v2.api.records.TaskAttemptId,TaskAttempt> getAttempts()
    • getAttempt

      TaskAttempt getAttempt(org.apache.hadoop.mapreduce.v2.api.records.TaskAttemptId attemptID)
    • isFinished

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

      boolean canCommit(org.apache.hadoop.mapreduce.v2.api.records.TaskAttemptId 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.