org.apache.hadoop.mapreduce.v2.api.records
Class JobId

java.lang.Object
  extended by 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
protected static String JOB
           
protected static char SEPARATOR
           
 
Constructor Summary
JobId()
           
 
Method Summary
 int compareTo(JobId other)
           
 boolean equals(Object obj)
           
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.
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.
 int hashCode()
           
abstract  void setAppId(org.apache.hadoop.yarn.api.records.ApplicationId appId)
           
abstract  void setId(int id)
           
 String toString()
           
 
Methods inherited from class java.lang.Object
clone, finalize, getClass, notify, notifyAll, wait, wait, wait
 

Field Detail

JOB

protected static final String JOB
See Also:
Constant Field Values

SEPARATOR

protected static final char SEPARATOR
See Also:
Constant Field Values
Constructor Detail

JobId

public JobId()
Method Detail

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>


Copyright © 2014 Apache Software Foundation. All Rights Reserved.