public class TaskID extends TaskID
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. 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
构造器和说明 |
---|
TaskID() |
TaskID(JobID jobId,
boolean isMap,
int id)
Constructs a TaskID object from given
JobID . |
TaskID(String jtIdentifier,
int jobId,
boolean isMap,
int id)
Constructs a TaskInProgressId object from given parts.
|
限定符和类型 | 方法和说明 |
---|---|
static TaskID |
downgrade(TaskID old)
Downgrade a new TaskID to an old one
|
static TaskID |
forName(String str) |
JobID |
getJobID()
Returns the
JobID object that this tip belongs to |
static String |
getTaskIDsPattern(String jtIdentifier,
Integer jobId,
Boolean isMap,
Integer taskId)
已过时。
|
static TaskID |
read(DataInput in)
已过时。
|
public TaskID(JobID jobId, boolean isMap, int id)
JobID
.jobId
- JobID that this tip belongs toisMap
- whether the tip is a mapid
- the tip numberpublic TaskID(String jtIdentifier, int jobId, boolean isMap, int id)
jtIdentifier
- jobTracker identifierjobId
- job numberisMap
- whether the tip is a mapid
- the tip numberpublic TaskID()
public static TaskID downgrade(TaskID old)
old
- a new or old TaskID@Deprecated public static TaskID read(DataInput in) throws IOException
IOException
@Deprecated public static String getTaskIDsPattern(String jtIdentifier, Integer jobId, Boolean isMap, Integer taskId)
TaskID.getTaskIDsPattern(null, null, true, 1);which will return :
"task_[^_]*_[0-9]*_m_000001*"
jtIdentifier
- jobTracker identifier, or nulljobId
- job number, or nullisMap
- whether the tip is a map, or nulltaskId
- taskId number, or nullpublic static TaskID forName(String str) throws IllegalArgumentException
Copyright © 2009 The Apache Software Foundation