public class TaskAttemptID extends ID
TaskID
, that this TaskAttemptID belongs to.
Second part is the task attempt number. 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.
Modifier and Type | Field and Description |
---|---|
protected static java.lang.String |
ATTEMPT |
Constructor and Description |
---|
TaskAttemptID() |
TaskAttemptID(java.lang.String jtIdentifier,
int jobId,
boolean isMap,
int taskId,
int id)
Constructs a TaskId object from given parts.
|
TaskAttemptID(java.lang.String jtIdentifier,
int jobId,
TaskType type,
int taskId,
int id)
Constructs a TaskId object from given parts.
|
TaskAttemptID(TaskID taskId,
int id)
Constructs a TaskAttemptID object from given
TaskID . |
Modifier and Type | Method and Description |
---|---|
protected java.lang.StringBuilder |
appendTo(java.lang.StringBuilder builder)
Add the unique string to the StringBuilder
|
int |
compareTo(ID o)
Compare TaskIds by first tipIds, then by task numbers.
|
boolean |
equals(java.lang.Object o) |
static TaskAttemptID |
forName(java.lang.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 |
TaskType |
getTaskType()
Returns the TaskType of the TaskAttemptID
|
int |
hashCode() |
boolean |
isMap()
Returns whether this TaskAttemptID is a map ID
|
void |
readFields(java.io.DataInput in) |
java.lang.String |
toString() |
void |
write(java.io.DataOutput out) |
protected static final java.lang.String ATTEMPT
public TaskAttemptID(TaskID taskId, int id)
TaskID
.taskId
- TaskID that this task belongs toid
- the task attempt numberpublic TaskAttemptID(java.lang.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(java.lang.String jtIdentifier, int jobId, TaskType type, int taskId, int id)
jtIdentifier
- jobTracker identifierjobId
- job numbertype
- the TaskTypetaskId
- taskId numberid
- the task attempt numberpublic TaskAttemptID()
public boolean isMap()
public TaskType getTaskType()
protected java.lang.StringBuilder appendTo(java.lang.StringBuilder builder)
builder
- the builder to append otpublic void readFields(java.io.DataInput in) throws java.io.IOException
readFields
in interface org.apache.hadoop.io.Writable
readFields
in class ID
java.io.IOException
public void write(java.io.DataOutput out) throws java.io.IOException
public int compareTo(ID o)
public static TaskAttemptID forName(java.lang.String str) throws java.lang.IllegalArgumentException
java.lang.IllegalArgumentException
- if the given string is malformedCopyright © 2009 The Apache Software Foundation