|
||||||||||
| 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.TaskAttemptID
public class TaskAttemptID
TaskAttemptID represents the immutable and unique identifier for
a task attempt. Each task attempt is one particular instance of a Map or
Reduce Task identified by its TaskID.
TaskAttemptID consists of 2 parts. First part is the
TaskID, that this TaskAttemptID belongs to.
Second part is the task attempt number.
An example TaskAttemptID is :
attempt_200707121733_0003_m_000005_0 , which represents the
zeroth task attempt for the fifth map task in the third job
running at the jobtracker started at 200707121733.
Applications should never construct or parse TaskAttemptID strings
, but rather use appropriate constructors or forName(String)
method.
JobID,
TaskID| Field Summary | |
|---|---|
protected static String |
ATTEMPT
|
| Fields inherited from class org.apache.hadoop.mapreduce.ID |
|---|
id, SEPARATOR |
| Constructor Summary | |
|---|---|
TaskAttemptID()
|
|
TaskAttemptID(String jtIdentifier,
int jobId,
boolean isMap,
int taskId,
int id)
Constructs a TaskId object from given parts. |
|
TaskAttemptID(TaskID taskId,
int id)
Constructs a TaskAttemptID object from given TaskID. |
|
| Method Summary | |
|---|---|
protected StringBuilder |
appendTo(StringBuilder builder)
Add the unique string to the StringBuilder |
int |
compareTo(ID o)
Compare TaskIds by first tipIds, then by task numbers. |
boolean |
equals(Object o)
|
static TaskAttemptID |
forName(String str)
Construct a TaskAttemptID object from given string |
JobID |
getJobID()
Returns the JobID object that this task attempt belongs to |
TaskID |
getTaskID()
Returns the TaskID object that this task attempt belongs to |
int |
hashCode()
|
boolean |
isMap()
Returns whether this TaskAttemptID is a map ID |
void |
readFields(DataInput in)
Deserialize the fields of this object from in. |
String |
toString()
|
void |
write(DataOutput out)
Serialize the fields of this object to 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 ATTEMPT
| Constructor Detail |
|---|
public TaskAttemptID(TaskID taskId,
int id)
TaskID.
taskId - TaskID that this task belongs toid - the task attempt number
public TaskAttemptID(String jtIdentifier,
int jobId,
boolean isMap,
int taskId,
int id)
jtIdentifier - jobTracker identifierjobId - job numberisMap - whether the tip is a maptaskId - taskId numberid - the task attempt numberpublic TaskAttemptID()
| Method Detail |
|---|
public JobID getJobID()
JobID object that this task attempt belongs to
public TaskID getTaskID()
TaskID object that this task attempt belongs to
public boolean isMap()
public boolean equals(Object o)
equals in class IDprotected StringBuilder appendTo(StringBuilder builder)
builder - the builder to append ot
public void readFields(DataInput in)
throws IOException
Writablein.
For efficiency, implementations should attempt to re-use storage in the existing object where possible.
readFields in interface WritablereadFields in class IDin - DataInput to deseriablize this object from.
IOException
public void write(DataOutput out)
throws IOException
Writableout.
write in interface Writablewrite in class IDout - DataOuput to serialize this object into.
IOExceptionpublic int hashCode()
hashCode in class IDpublic int compareTo(ID o)
compareTo in interface Comparable<ID>compareTo in class IDpublic String toString()
toString in class ID
public static TaskAttemptID forName(String str)
throws IllegalArgumentException
IllegalArgumentException - if the given string is malformed
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||