|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectorg.apache.hadoop.mapreduce.ID
org.apache.hadoop.mapred.ID
org.apache.hadoop.mapreduce.TaskID
@InterfaceAudience.Public @InterfaceStability.Stable public class TaskID
TaskID represents the immutable and unique identifier for
a Map or Reduce Task. Each TaskID encompasses multiple attempts made to
execute the Map or Reduce Task, each of which are uniquely indentified by
their TaskAttemptID.
TaskID consists of 3 parts. First part is the JobID, that this
TaskInProgress 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.
An example TaskID is :
task_200707121733_0003_m_000005 , which represents the
fifth map task in the third job running at the jobtracker
started at 200707121733.
Applications should never construct or parse TaskID strings
, but rather use appropriate constructors or forName(String)
method.
JobID,
TaskAttemptID| Field Summary | |
|---|---|
protected static NumberFormat |
idFormat
|
protected static String |
TASK
|
| Fields inherited from class org.apache.hadoop.mapreduce.ID |
|---|
id, SEPARATOR |
| Constructor Summary | |
|---|---|
TaskID()
|
|
TaskID(JobID jobId,
boolean isMap,
int id)
Deprecated. |
|
TaskID(JobID jobId,
TaskType type,
int id)
Constructs a TaskID object from given JobID. |
|
TaskID(String jtIdentifier,
int jobId,
boolean isMap,
int id)
Deprecated. |
|
TaskID(String jtIdentifier,
int jobId,
TaskType type,
int id)
Constructs a TaskInProgressId object from given parts. |
|
| Method Summary | |
|---|---|
protected StringBuilder |
appendTo(StringBuilder builder)
Add the unique string to the given builder. |
int |
compareTo(ID o)
Compare TaskInProgressIds by first jobIds, then by tip numbers. |
boolean |
equals(Object o)
|
static TaskID |
forName(String str)
Construct a TaskID object from given string |
static String |
getAllTaskTypes()
|
JobID |
getJobID()
Returns the JobID object that this tip belongs to |
static char |
getRepresentingCharacter(TaskType type)
Gets the character representing the TaskType |
TaskType |
getTaskType()
Get the type of the task |
static TaskType |
getTaskType(char c)
Gets the TaskType corresponding to the character |
int |
hashCode()
|
boolean |
isMap()
Deprecated. |
void |
readFields(DataInput in)
|
String |
toString()
|
void |
write(DataOutput out)
|
| Methods inherited from class org.apache.hadoop.mapreduce.ID |
|---|
getId |
| Methods inherited from class java.lang.Object |
|---|
clone, finalize, getClass, notify, notifyAll, wait, wait, wait |
| Field Detail |
|---|
protected static final String TASK
protected static final NumberFormat idFormat
| Constructor Detail |
|---|
public TaskID(JobID jobId,
TaskType type,
int id)
JobID.
jobId - JobID that this tip belongs totype - the TaskType of the taskid - the tip number
public TaskID(String jtIdentifier,
int jobId,
TaskType type,
int id)
jtIdentifier - jobTracker identifierjobId - job numbertype - the TaskTypeid - the tip number
@Deprecated
public TaskID(JobID jobId,
boolean isMap,
int id)
JobID.
jobId - JobID that this tip belongs toisMap - whether the tip is a mapid - the tip number
@Deprecated
public TaskID(String jtIdentifier,
int jobId,
boolean isMap,
int id)
jtIdentifier - jobTracker identifierjobId - job numberisMap - whether the tip is a mapid - the tip numberpublic TaskID()
| Method Detail |
|---|
public JobID getJobID()
JobID object that this tip belongs to
@Deprecated public boolean isMap()
public TaskType getTaskType()
public boolean equals(Object o)
equals in class IDpublic int compareTo(ID o)
compareTo in interface Comparable<ID>compareTo in class IDpublic String toString()
toString in class IDprotected StringBuilder appendTo(StringBuilder builder)
builder - the builder to append to
public int hashCode()
hashCode in class ID
public void readFields(DataInput in)
throws IOException
readFields in interface org.apache.hadoop.io.WritablereadFields in class IDIOException
public void write(DataOutput out)
throws IOException
write in interface org.apache.hadoop.io.Writablewrite in class IDIOException
public static TaskID forName(String str)
throws IllegalArgumentException
IllegalArgumentException - if the given string is malformedpublic static char getRepresentingCharacter(TaskType type)
TaskType
type - the TaskType
public static TaskType getTaskType(char c)
TaskType corresponding to the character
c - the character
public static String getAllTaskTypes()
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||