Class ApplicationAttemptId
java.lang.Object
org.apache.hadoop.yarn.api.records.ApplicationAttemptId
- All Implemented Interfaces:
Comparable<ApplicationAttemptId>
@Public
@Stable
public abstract class ApplicationAttemptId
extends Object
implements Comparable<ApplicationAttemptId>
ApplicationAttemptId denotes the particular attempt
of an ApplicationMaster for a given ApplicationId.
Multiple attempts might be needed to run an application to completion due
to temporal failures of the ApplicationMaster such as hardware
failures, connectivity issues etc. on the node on which it was scheduled.
-
Field Summary
Fields -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionprotected abstract voidbuild()intcompareTo(ApplicationAttemptId other) booleanstatic ApplicationAttemptIdfromString(String appAttemptIdStr) abstract ApplicationIdGet theApplicationIdof theApplicationAttempId.abstract intGet theattempt idof theApplication.inthashCode()static ApplicationAttemptIdnewInstance(ApplicationId appId, int attemptId) protected abstract voidsetApplicationId(ApplicationId appID) protected abstract voidsetAttemptId(int attemptId) toString()
-
Field Details
-
appAttemptIdStrPrefix
- See Also:
-
-
Constructor Details
-
ApplicationAttemptId
public ApplicationAttemptId()
-
-
Method Details
-
newInstance
@Public @Unstable public static ApplicationAttemptId newInstance(ApplicationId appId, int attemptId) -
getApplicationId
Get theApplicationIdof theApplicationAttempId.- Returns:
ApplicationIdof theApplicationAttempId
-
setApplicationId
-
getAttemptId
@Public @Stable public abstract int getAttemptId()Get theattempt idof theApplication.- Returns:
attempt idof theApplication
-
setAttemptId
@Private @Unstable protected abstract void setAttemptId(int attemptId) -
hashCode
public int hashCode() -
equals
-
compareTo
- Specified by:
compareToin interfaceComparable<ApplicationAttemptId>
-
toString
-
build
protected abstract void build() -
fromString
-