|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object org.apache.hadoop.mapred.ID org.apache.hadoop.mapred.JobID
public class JobID
JobID represents the immutable and unique identifier for
the job. JobID consists of two parts. First part
represents the jobtracker identifier, so that jobID to jobtracker map
is defined. For cluster setup this string is the jobtracker
start time, for local setting, it is "local".
Second part of the JobID is the job number.
An example JobID is :
job_200707121733_0003
, which represents the third job
running at the jobtracker started at 200707121733
.
Applications should never construct or parse JobID strings, but rather
use appropriate constructors or forName(String)
method.
TaskID
,
TaskAttemptID
,
JobTracker.getNewJobId()
,
JobTracker.getStartTime()
Field Summary |
---|
Fields inherited from class org.apache.hadoop.mapred.ID |
---|
id |
Constructor Summary | |
---|---|
JobID(String jtIdentifier,
int id)
Constructs a JobID object |
Method Summary | |
---|---|
int |
compareTo(ID o)
Compare JobIds by first jtIdentifiers, then by job numbers |
boolean |
equals(Object o)
|
static JobID |
forName(String str)
Construct a JobId object from given string |
static String |
getJobIDsPattern(String jtIdentifier,
Integer jobId)
Returns a regex pattern which matches task IDs. |
String |
getJtIdentifier()
|
int |
hashCode()
|
static JobID |
read(DataInput in)
|
void |
readFields(DataInput in)
Deserialize the fields of this object from in . |
String |
toString()
|
void |
write(DataOutput out)
Serialize the fields of this object to out . |
Methods inherited from class org.apache.hadoop.mapred.ID |
---|
getId |
Methods inherited from class java.lang.Object |
---|
clone, finalize, getClass, notify, notifyAll, wait, wait, wait |
Constructor Detail |
---|
public JobID(String jtIdentifier, int id)
jtIdentifier
- jobTracker identifierid
- job numberMethod Detail |
---|
public String getJtIdentifier()
public boolean equals(Object o)
equals
in class ID
public int compareTo(ID o)
compareTo
in interface Comparable<ID>
compareTo
in class ID
public String toString()
toString
in class ID
public int hashCode()
hashCode
in class ID
public void readFields(DataInput in) throws IOException
Writable
in
.
For efficiency, implementations should attempt to re-use storage in the existing object where possible.
readFields
in interface Writable
readFields
in class ID
in
- DataInput
to deseriablize this object from.
IOException
public void write(DataOutput out) throws IOException
Writable
out
.
write
in interface Writable
write
in class ID
out
- DataOuput
to serialize this object into.
IOException
public static JobID read(DataInput in) throws IOException
IOException
public static JobID forName(String str) throws IllegalArgumentException
IllegalArgumentException
- if the given string is malformedpublic static String getJobIDsPattern(String jtIdentifier, Integer jobId)
JobID.getTaskIDsPattern("200707121733", null);which will return :
"job_200707121733_[0-9]*"
jtIdentifier
- jobTracker identifier, or nulljobId
- job number, or null
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |