java.lang.Object
org.apache.hadoop.mapreduce.v2.api.records.JobId
All Implemented Interfaces:
Comparable<JobId>
Direct Known Subclasses:
JobIdPBImpl

public abstract class JobId extends Object implements Comparable<JobId>

JobId represents the globally unique identifier for a MapReduce job.

The globally unique nature of the identifier is achieved by using the cluster timestamp from the associated ApplicationId. i.e. start-time of the ResourceManager along with a monotonically increasing counter for the jobId.

  • Field Summary

    Fields
    Modifier and Type
    Field
    Description
    protected static final String
     
    protected static final char
     
  • Constructor Summary

    Constructors
    Constructor
    Description
     
  • Method Summary

    Modifier and Type
    Method
    Description
    int
     
    boolean
     
    abstract org.apache.hadoop.yarn.api.records.ApplicationId
    Get the associated ApplicationId which represents the start time of the ResourceManager and is used to generate the globally unique JobId.
    abstract int
    Get the short integer identifier of the JobId which is unique for all applications started by a particular instance of the ResourceManager.
    int
     
    abstract void
    setAppId(org.apache.hadoop.yarn.api.records.ApplicationId appId)
     
    abstract void
    setId(int id)
     
     

    Methods inherited from class java.lang.Object

    clone, finalize, getClass, notify, notifyAll, wait, wait, wait
  • Field Details

  • Constructor Details

    • JobId

      public JobId()
  • Method Details

    • getAppId

      public abstract org.apache.hadoop.yarn.api.records.ApplicationId getAppId()
      Get the associated ApplicationId which represents the start time of the ResourceManager and is used to generate the globally unique JobId.
      Returns:
      associated ApplicationId
    • getId

      public abstract int getId()
      Get the short integer identifier of the JobId which is unique for all applications started by a particular instance of the ResourceManager.
      Returns:
      short integer identifier of the JobId
    • setAppId

      public abstract void setAppId(org.apache.hadoop.yarn.api.records.ApplicationId appId)
    • setId

      public abstract void setId(int id)
    • toString

      public String toString()
      Overrides:
      toString in class Object
    • hashCode

      public int hashCode()
      Overrides:
      hashCode in class Object
    • equals

      public boolean equals(Object obj)
      Overrides:
      equals in class Object
    • compareTo

      public int compareTo(JobId other)
      Specified by:
      compareTo in interface Comparable<JobId>