Class ApplicationAttemptStateData
java.lang.Object
org.apache.hadoop.yarn.server.resourcemanager.recovery.records.ApplicationAttemptStateData
- Direct Known Subclasses:
ApplicationAttemptStateDataPBImpl
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionabstract intabstract org.apache.hadoop.security.CredentialsThe application attempt tokens that belong to this attemptabstract org.apache.hadoop.yarn.api.records.ApplicationAttemptIdThe ApplicationAttemptId for the application attemptabstract StringGet the diagnositic information of the attemptabstract org.apache.hadoop.yarn.api.records.FinalApplicationStatusGet the final finish status of the application.abstract StringGet the original not-proxied final tracking url for the application.abstract longGet the finish time of the application attempt.abstract org.apache.hadoop.yarn.api.records.Containerabstract longGet the memory seconds (in MB seconds) of the application.abstract longGet the preempted memory seconds (in MB seconds) of the application.Get the aggregated number of resources preempted that the application has allocated times the number of seconds the application has been running.abstract longGet the preempted vcore seconds of the application.abstract org.apache.hadoop.yarn.proto.YarnServerResourceManagerRecoveryProtos.ApplicationAttemptStateDataProtogetProto()Get the aggregated number of resources preempted that the application has allocated times the number of seconds the application has been running.abstract longGet the start time of the application.abstract RMAppAttemptStategetState()Get the final state of the application attempt.abstract intGet total number of containers allocated for this attempt.abstract longGet the vcore seconds of the application.static ApplicationAttemptStateDatanewInstance(org.apache.hadoop.yarn.api.records.ApplicationAttemptId attemptId, org.apache.hadoop.yarn.api.records.Container masterContainer, org.apache.hadoop.security.Credentials attemptTokens, long startTime, Map<String, Long> resourceSeondsMap, Map<String, Long> preemptedResourceSecondsMap, int totalAllocatedContainers) static ApplicationAttemptStateDatanewInstance(org.apache.hadoop.yarn.api.records.ApplicationAttemptId attemptId, org.apache.hadoop.yarn.api.records.Container container, org.apache.hadoop.security.Credentials attemptTokens, long startTime, RMAppAttemptState finalState, String finalTrackingUrl, String diagnostics, org.apache.hadoop.yarn.api.records.FinalApplicationStatus amUnregisteredFinalStatus, int exitStatus, long finishTime, Map<String, Long> resourceSecondsMap, Map<String, Long> preemptedResourceSecondsMap, int totalAllocatedContainers) abstract voidsetAMContainerExitStatus(int exitStatus) abstract voidsetAppAttemptTokens(org.apache.hadoop.security.Credentials attemptTokens) abstract voidsetAttemptId(org.apache.hadoop.yarn.api.records.ApplicationAttemptId attemptId) abstract voidsetDiagnostics(String diagnostics) abstract voidsetFinalApplicationStatus(org.apache.hadoop.yarn.api.records.FinalApplicationStatus finishState) abstract voidSet the final tracking Url of the AM.abstract voidsetFinishTime(long finishTime) abstract voidsetMasterContainer(org.apache.hadoop.yarn.api.records.Container container) abstract voidsetMemorySeconds(long memorySeconds) abstract voidsetPreemptedMemorySeconds(long memorySeconds) abstract voidsetPreemptedResourceSecondsMap(Map<String, Long> preemptedResourceSecondsMap) Set the aggregated number of resources preempted that the application has allocated times the number of seconds the application has been running.abstract voidsetPreemptedVcoreSeconds(long vcoreSeconds) abstract voidsetResourceSecondsMap(Map<String, Long> resourceSecondsMap) Set the aggregated number of resources that the application has allocated times the number of seconds the application has been running.abstract voidsetStartTime(long startTime) abstract voidsetState(RMAppAttemptState state) abstract voidsetTotalAllocatedContainers(int totalAllocatedContainers) Set total number of containers allocated for this attempt.abstract voidsetVcoreSeconds(long vcoreSeconds)
-
Constructor Details
-
ApplicationAttemptStateData
public ApplicationAttemptStateData()
-
-
Method Details
-
newInstance
public static ApplicationAttemptStateData newInstance(org.apache.hadoop.yarn.api.records.ApplicationAttemptId attemptId, org.apache.hadoop.yarn.api.records.Container container, org.apache.hadoop.security.Credentials attemptTokens, long startTime, RMAppAttemptState finalState, String finalTrackingUrl, String diagnostics, org.apache.hadoop.yarn.api.records.FinalApplicationStatus amUnregisteredFinalStatus, int exitStatus, long finishTime, Map<String, Long> resourceSecondsMap, Map<String, Long> preemptedResourceSecondsMap, int totalAllocatedContainers) -
newInstance
public static ApplicationAttemptStateData newInstance(org.apache.hadoop.yarn.api.records.ApplicationAttemptId attemptId, org.apache.hadoop.yarn.api.records.Container masterContainer, org.apache.hadoop.security.Credentials attemptTokens, long startTime, Map<String, Long> resourceSeondsMap, Map<String, Long> preemptedResourceSecondsMap, int totalAllocatedContainers) -
getProto
public abstract org.apache.hadoop.yarn.proto.YarnServerResourceManagerRecoveryProtos.ApplicationAttemptStateDataProto getProto() -
getAttemptId
@Public @Unstable public abstract org.apache.hadoop.yarn.api.records.ApplicationAttemptId getAttemptId()The ApplicationAttemptId for the application attempt- Returns:
- ApplicationAttemptId for the application attempt
-
setAttemptId
public abstract void setAttemptId(org.apache.hadoop.yarn.api.records.ApplicationAttemptId attemptId) -
getMasterContainer
@Public @Unstable public abstract org.apache.hadoop.yarn.api.records.Container getMasterContainer() -
setMasterContainer
public abstract void setMasterContainer(org.apache.hadoop.yarn.api.records.Container container) -
getAppAttemptTokens
@Public @Unstable public abstract org.apache.hadoop.security.Credentials getAppAttemptTokens()The application attempt tokens that belong to this attempt- Returns:
- The application attempt tokens that belong to this attempt
-
setAppAttemptTokens
public abstract void setAppAttemptTokens(org.apache.hadoop.security.Credentials attemptTokens) -
getState
Get the final state of the application attempt.- Returns:
- the final state of the application attempt.
-
setState
-
getFinalTrackingUrl
Get the original not-proxied final tracking url for the application. This is intended to only be used by the proxy itself.- Returns:
- the original not-proxied final tracking url for the application
-
setFinalTrackingUrl
Set the final tracking Url of the AM.- Parameters:
url- tracking url.
-
getDiagnostics
Get the diagnositic information of the attempt- Returns:
- diagnositic information of the attempt
-
setDiagnostics
-
getStartTime
public abstract long getStartTime()Get the start time of the application.- Returns:
- start time of the application
-
setStartTime
public abstract void setStartTime(long startTime) -
getFinalApplicationStatus
public abstract org.apache.hadoop.yarn.api.records.FinalApplicationStatus getFinalApplicationStatus()Get the final finish status of the application.- Returns:
- final finish status of the application
-
setFinalApplicationStatus
public abstract void setFinalApplicationStatus(org.apache.hadoop.yarn.api.records.FinalApplicationStatus finishState) -
getAMContainerExitStatus
public abstract int getAMContainerExitStatus() -
setAMContainerExitStatus
public abstract void setAMContainerExitStatus(int exitStatus) -
getFinishTime
public abstract long getFinishTime()Get the finish time of the application attempt.- Returns:
- finish time of the application attempt
-
setFinishTime
public abstract void setFinishTime(long finishTime) -
getMemorySeconds
@Public @Unstable public abstract long getMemorySeconds()Get the memory seconds (in MB seconds) of the application.- Returns:
- memory seconds (in MB seconds) of the application
-
setMemorySeconds
@Public @Unstable public abstract void setMemorySeconds(long memorySeconds) -
getVcoreSeconds
@Public @Unstable public abstract long getVcoreSeconds()Get the vcore seconds of the application.- Returns:
- vcore seconds of the application
-
setVcoreSeconds
@Public @Unstable public abstract void setVcoreSeconds(long vcoreSeconds) -
getPreemptedMemorySeconds
@Public @Unstable public abstract long getPreemptedMemorySeconds()Get the preempted memory seconds (in MB seconds) of the application.- Returns:
- preempted memory seconds (in MB seconds) of the application
-
setPreemptedMemorySeconds
@Public @Unstable public abstract void setPreemptedMemorySeconds(long memorySeconds) -
getPreemptedVcoreSeconds
@Public @Unstable public abstract long getPreemptedVcoreSeconds()Get the preempted vcore seconds of the application.- Returns:
- preempted vcore seconds of the application
-
setPreemptedVcoreSeconds
@Public @Unstable public abstract void setPreemptedVcoreSeconds(long vcoreSeconds) -
getResourceSecondsMap
Get the aggregated number of resources preempted that the application has allocated times the number of seconds the application has been running.- Returns:
- map containing the resource name and aggregated preempted resource-seconds
-
setResourceSecondsMap
Set the aggregated number of resources that the application has allocated times the number of seconds the application has been running.- Parameters:
resourceSecondsMap- map containing the resource name and aggregated resource-seconds
-
getPreemptedResourceSecondsMap
Get the aggregated number of resources preempted that the application has allocated times the number of seconds the application has been running.- Returns:
- map containing the resource name and aggregated preempted resource-seconds
-
setPreemptedResourceSecondsMap
@Public @Unstable public abstract void setPreemptedResourceSecondsMap(Map<String, Long> preemptedResourceSecondsMap) Set the aggregated number of resources preempted that the application has allocated times the number of seconds the application has been running.- Parameters:
preemptedResourceSecondsMap- map containing the resource name and aggregated preempted resource-seconds
-
getTotalAllocatedContainers
@Public @Unstable public abstract int getTotalAllocatedContainers()Get total number of containers allocated for this attempt.- Returns:
- total number of containers allocated for this attempt.
-
setTotalAllocatedContainers
@Public @Unstable public abstract void setTotalAllocatedContainers(int totalAllocatedContainers) Set total number of containers allocated for this attempt.- Parameters:
totalAllocatedContainers- total number of containers
-