Interface Task
- All Known Implementing Classes:
MapTaskImpl,ReduceTaskImpl,TaskImpl
public interface Task
Read only view of Task.
-
Method Summary
Modifier and TypeMethodDescriptionbooleancanCommit(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.Countersorg.apache.hadoop.mapreduce.v2.api.records.TaskIdgetID()floatorg.apache.hadoop.mapreduce.v2.api.records.TaskReportorg.apache.hadoop.mapreduce.v2.api.records.TaskStategetState()org.apache.hadoop.mapreduce.v2.api.records.TaskTypegetType()booleanHas 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
-
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.
-