|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object org.apache.hadoop.mapreduce.ID org.apache.hadoop.mapred.ID org.apache.hadoop.mapreduce.TaskAttemptID org.apache.hadoop.mapred.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 |
---|
Fields inherited from class org.apache.hadoop.mapreduce.TaskAttemptID |
---|
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 | |
---|---|
static TaskAttemptID |
downgrade(TaskAttemptID old)
Downgrade a new TaskAttemptID to an old one |
static TaskAttemptID |
forName(String str)
Construct a TaskAttemptID object from given string |
JobID |
getJobID()
Returns the JobID object that this task attempt belongs to |
static String |
getTaskAttemptIDsPattern(String jtIdentifier,
Integer jobId,
Boolean isMap,
Integer taskId,
Integer attemptId)
Deprecated. |
TaskID |
getTaskID()
Returns the TaskID object that this task attempt belongs to |
static TaskAttemptID |
read(DataInput in)
Deprecated. |
Methods inherited from class org.apache.hadoop.mapreduce.TaskAttemptID |
---|
appendTo, compareTo, equals, hashCode, isMap, readFields, toString, write |
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 |
Constructor Detail |
---|
public TaskAttemptID(TaskID taskId, int id)
TaskID
.
taskId
- TaskID that this task belongs toid
- the task attempt numberpublic 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 static TaskAttemptID downgrade(TaskAttemptID old)
old
- the new id
public TaskID getTaskID()
TaskAttemptID
TaskID
object that this task attempt belongs to
getTaskID
in class TaskAttemptID
public JobID getJobID()
TaskAttemptID
JobID
object that this task attempt belongs to
getJobID
in class TaskAttemptID
@Deprecated public static TaskAttemptID read(DataInput in) throws IOException
IOException
public static TaskAttemptID forName(String str) throws IllegalArgumentException
IllegalArgumentException
- if the given string is malformed@Deprecated public static String getTaskAttemptIDsPattern(String jtIdentifier, Integer jobId, Boolean isMap, Integer taskId, Integer attemptId)
TaskAttemptID.getTaskAttemptIDsPattern(null, null, true, 1, null);which will return :
"attempt_[^_]*_[0-9]*_m_000001_[0-9]*"
jtIdentifier
- jobTracker identifier, or nulljobId
- job number, or nullisMap
- whether the tip is a map, or nulltaskId
- taskId number, or nullattemptId
- the task attempt number, or null
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |