JobID (Hadoop 0.20.2-cdh3u1 API)
Date: 2011-07-18

Overview | Package | Class | Use | Tree | Deprecated | Index | Help
PREV CLASS NEXT CLASS | FRAMES NO FRAMES
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD

## 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>

    public class JobID

extends 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.

See Also:
  `TaskID`, `TaskAttemptID`

Field Summary

Fields inherited from class org.apache.hadoop.mapreduce.JobID
`idFormat, JOB`

Fields inherited from class org.apache.hadoop.mapreduce.ID
`id, SEPARATOR`

Constructor Summary
`JobID()`
`JobID(String jtIdentifier, int id)` Constructs a JobID object

Method Summary
`static JobID` | `downgrade(JobID old)` Downgrade a new JobID to an old one
`static JobID` | `forName(String str)` Construct a JobId object from given string
`static String` | `getJobIDsPattern(String jtIdentifier, Integer jobId)` Deprecated.
`static JobID` | `read(DataInput in)` Deprecated.

Methods inherited from class org.apache.hadoop.mapreduce.JobID
`appendTo, compareTo, equals, getJtIdentifier, hashCode, readFields, toString, write`

Methods inherited from class org.apache.hadoop.mapreduce.ID
`getId`

Methods inherited from class java.lang.Object
`clone, finalize, getClass, notify, notifyAll, wait, wait, wait`

Constructor Detail

### JobID

    public JobID(String jtIdentifier,
                 int id)

  Constructs a JobID object

  Parameters:
    `jtIdentifier` - jobTracker identifier
    `id` - job number

### JobID

    public JobID()

Method Detail

### downgrade

    public static JobID downgrade(JobID old)

  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
    public static JobID read(DataInput in)
                      throws IOException

  Deprecated.

  Throws:
    `IOException`

### forName

    public static JobID forName(String str)
                         throws IllegalArgumentException

  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
    public static String getJobIDsPattern(String jtIdentifier,
                                                     Integer jobId)

  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 null
    `jobId` - job number, or null
  Returns:
    a regex pattern matching JobIDs

Overview | Package | Class | Use | Tree | Deprecated | Index | Help
PREV CLASS NEXT CLASS | FRAMES NO FRAMES
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD

Copyright © 2009 The Apache Software Foundation