org.apache.hadoop.mapreduce.v2.api.records
Class TaskId
java.lang.Object
org.apache.hadoop.mapreduce.v2.api.records.TaskId
- All Implemented Interfaces:
- Comparable<TaskId>
- Direct Known Subclasses:
- TaskIdPBImpl
public abstract class TaskId
- extends Object
- implements Comparable<TaskId>
TaskId represents the unique identifier for a Map or Reduce
Task.
TaskId consists of 3 parts. First part is JobId, that this Task
belongs to. Second part of the TaskId is either 'm' or 'r' representing
whether the task is a map task or a reduce task. And the third part is the
task number.
TASK
protected static final String TASK
- See Also:
- Constant Field Values
TaskId
public TaskId()
getJobId
public abstract JobId getJobId()
- Returns:
- the associated
JobId
getTaskType
public abstract TaskType getTaskType()
- Returns:
- the type of the task - MAP/REDUCE
getId
public abstract int getId()
- Returns:
- the task number.
setJobId
public abstract void setJobId(JobId jobId)
setTaskType
public abstract void setTaskType(TaskType taskType)
setId
public abstract void setId(int id)
hashCode
public int hashCode()
- Overrides:
hashCode in class Object
equals
public boolean equals(Object obj)
- Overrides:
equals in class Object
toString
public String toString()
- Overrides:
toString in class Object
compareTo
public int compareTo(TaskId other)
- Specified by:
compareTo in interface Comparable<TaskId>
Copyright © 2013 Apache Software Foundation. All Rights Reserved.