org.apache.hadoop.yarn.api.records
Class ApplicationId
java.lang.Object
org.apache.hadoop.yarn.api.records.ApplicationId
- All Implemented Interfaces:
- Comparable<ApplicationId>
@InterfaceAudience.Public
@InterfaceStability.Stable
public abstract class ApplicationId
- extends Object
- implements Comparable<ApplicationId>
ApplicationId represents the globally unique
identifier for an application.
The globally unique nature of the identifier is achieved by using the
cluster timestamp i.e. start-time of the
ResourceManager along with a monotonically increasing counter
for the application.
appIdStrPrefix
@InterfaceAudience.Private
@InterfaceStability.Unstable
public static final String appIdStrPrefix
- See Also:
- Constant Field Values
ApplicationId
public ApplicationId()
newInstance
@InterfaceAudience.Private
@InterfaceStability.Unstable
public static ApplicationId newInstance(long clusterTimestamp,
int id)
getId
@InterfaceAudience.Public
@InterfaceStability.Stable
public abstract int getId()
- Get the short integer identifier of the
ApplicationId
which is unique for all applications started by a particular instance
of the ResourceManager.
- Returns:
- short integer identifier of the
ApplicationId
setId
@InterfaceAudience.Private
@InterfaceStability.Unstable
protected abstract void setId(int id)
getClusterTimestamp
@InterfaceAudience.Public
@InterfaceStability.Stable
public abstract long getClusterTimestamp()
- Get the start time of the
ResourceManager which is
used to generate globally unique ApplicationId.
- Returns:
- start time of the
ResourceManager
setClusterTimestamp
@InterfaceAudience.Private
@InterfaceStability.Unstable
protected abstract void setClusterTimestamp(long clusterTimestamp)
build
protected abstract void build()
compareTo
public int compareTo(ApplicationId other)
- Specified by:
compareTo in interface Comparable<ApplicationId>
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
Copyright © 2014 Apache Software Foundation. All Rights Reserved.