Class ApplicationId
java.lang.Object
org.apache.hadoop.yarn.api.records.ApplicationId
- All Implemented Interfaces:
Comparable<ApplicationId>
@Public
@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.
-
Field Summary
Fields -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionprotected abstract voidbuild()intcompareTo(ApplicationId other) booleanstatic ApplicationIdfromString(String appIdStr) abstract longGet the start time of theResourceManagerwhich is used to generate globally uniqueApplicationId.abstract intgetId()Get the short integer identifier of theApplicationIdwhich is unique for all applications started by a particular instance of theResourceManager.inthashCode()static ApplicationIdnewInstance(long clusterTimestamp, int id) protected abstract voidsetClusterTimestamp(long clusterTimestamp) protected abstract voidsetId(int id) toString()
-
Field Details
-
appIdStrPrefix
- See Also:
-
-
Constructor Details
-
ApplicationId
public ApplicationId()
-
-
Method Details
-
newInstance
-
getId
@Public @Stable public abstract int getId()Get the short integer identifier of theApplicationIdwhich is unique for all applications started by a particular instance of theResourceManager.- Returns:
- short integer identifier of the
ApplicationId
-
setId
@Private @Unstable protected abstract void setId(int id) -
getClusterTimestamp
@Public @Stable public abstract long getClusterTimestamp()Get the start time of theResourceManagerwhich is used to generate globally uniqueApplicationId.- Returns:
- start time of the
ResourceManager
-
setClusterTimestamp
@Private @Unstable protected abstract void setClusterTimestamp(long clusterTimestamp) -
build
protected abstract void build() -
compareTo
- Specified by:
compareToin interfaceComparable<ApplicationId>
-
toString
-
fromString
-
hashCode
public int hashCode() -
equals
-