org.apache.hadoop.mapreduce.v2.api.records
Class TaskId

java.lang.Object
  extended by 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.


Field Summary
protected static String TASK
           
 
Constructor Summary
TaskId()
           
 
Method Summary
 int compareTo(TaskId other)
           
 boolean equals(Object obj)
           
abstract  int getId()
           
abstract  JobId getJobId()
           
abstract  TaskType getTaskType()
           
 int hashCode()
           
abstract  void setId(int id)
           
abstract  void setJobId(JobId jobId)
           
abstract  void setTaskType(TaskType taskType)
           
 String toString()
           
 
Methods inherited from class java.lang.Object
clone, finalize, getClass, notify, notifyAll, wait, wait, wait
 

Field Detail

TASK

protected static final String TASK
See Also:
Constant Field Values
Constructor Detail

TaskId

public TaskId()
Method Detail

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.