Package org.apache.hadoop.mapred
Class JobID
java.lang.Object
org.apache.hadoop.mapreduce.ID
org.apache.hadoop.mapred.ID
org.apache.hadoop.mapreduce.JobID
org.apache.hadoop.mapred.JobID
- All Implemented Interfaces:
Comparable<ID>,Writable,WritableComparable<ID>
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 :
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.
- See Also:
-
Field Summary
Fields inherited from class org.apache.hadoop.mapreduce.JobID
idFormat, JOB, JOBID_REGEX -
Constructor Summary
Constructors -
Method Summary
Methods inherited from class org.apache.hadoop.mapreduce.JobID
appendTo, compareTo, equals, getJtIdentifier, hashCode, readFields, toString, write
-
Constructor Details
-
JobID
Constructs a JobID object- Parameters:
jtIdentifier- jobTracker identifierid- job number
-
JobID
public JobID()
-
-
Method Details
-
downgrade
Downgrade a new JobID to an old one- Parameters:
old- a new or old JobID- Returns:
- either old or a new JobID build to match old
-
read
Deprecated.- Throws:
IOException
-
forName
Construct a JobId object from given string- Returns:
- constructed JobId object or null if the given String is null
- Throws:
IllegalArgumentException- if the given string is malformed
-
getJobIDsPattern
Deprecated.Returns a regex pattern which matches task IDs. Arguments can be given null, in which case that part of the regex will be generic. For example to obtain a regex matching any job run on the jobtracker started at 200707121733, we would use :JobID.getTaskIDsPattern("200707121733", null);which will return :"job_200707121733_[0-9]*"
- Parameters:
jtIdentifier- jobTracker identifier, or nulljobId- job number, or null- Returns:
- a regex pattern matching JobIDs
-