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
Constructor and Description |
---|
TaskID() |
TaskID(JobID jobId,
boolean isMap,
int id)
Constructs a TaskID object from given
JobID . |
TaskID(java.lang.String jtIdentifier,
int jobId,
boolean isMap,
int id)
Constructs a TaskInProgressId object from given parts.
|
Modifier and Type | Method and Description |
---|---|
static TaskID |
downgrade(TaskID old)
Downgrade a new TaskID to an old one
|
static TaskID |
forName(java.lang.String str) |
JobID |
getJobID()
Returns the
JobID object that this tip belongs to |
static java.lang.String |
getTaskIDsPattern(java.lang.String jtIdentifier,
java.lang.Integer jobId,
java.lang.Boolean isMap,
java.lang.Integer taskId)
Deprecated.
|
static TaskID |
read(java.io.DataInput in)
Deprecated.
|
appendTo, compareTo, equals, getTaskType, hashCode, isMap, readFields, toString, write
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(java.lang.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(java.io.DataInput in) throws java.io.IOException
java.io.IOException
public JobID getJobID()
TaskID
JobID
object that this tip belongs to@Deprecated public static java.lang.String getTaskIDsPattern(java.lang.String jtIdentifier, java.lang.Integer jobId, java.lang.Boolean isMap, java.lang.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(java.lang.String str) throws java.lang.IllegalArgumentException
java.lang.IllegalArgumentException
Copyright © 2009 The Apache Software Foundation