public class TaskAttemptID extends TaskAttemptID
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.
ATTEMPT
构造器和说明 |
---|
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 . |
限定符和类型 | 方法和说明 |
---|---|
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)
已过时。
|
TaskID |
getTaskID()
Returns the
TaskID object that this task attempt belongs to |
static TaskAttemptID |
read(DataInput in)
已过时。
|
appendTo, compareTo, equals, hashCode, isMap, readFields, toString, write
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()
public static TaskAttemptID downgrade(TaskAttemptID old)
old
- the new idpublic TaskID getTaskID()
TaskAttemptID
TaskID
object that this task attempt belongs togetTaskID
在类中 TaskAttemptID
public JobID getJobID()
TaskAttemptID
JobID
object that this task attempt belongs togetJobID
在类中 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 nullCopyright © 2009 The Apache Software Foundation