public class RMAppAttemptImpl extends Object implements RMAppAttempt, Recoverable
| Modifier and Type | Class and Description |
|---|---|
static class |
RMAppAttemptImpl.ScheduleTransition |
| Modifier and Type | Field and Description |
|---|---|
static org.apache.hadoop.yarn.api.records.Priority |
AM_CONTAINER_PRIORITY |
| Constructor and Description |
|---|
RMAppAttemptImpl(org.apache.hadoop.yarn.api.records.ApplicationAttemptId appAttemptId,
RMContext rmContext,
YarnScheduler scheduler,
ApplicationMasterService masterService,
org.apache.hadoop.yarn.api.records.ApplicationSubmissionContext submissionContext,
org.apache.hadoop.conf.Configuration conf,
List<org.apache.hadoop.yarn.api.records.ResourceRequest> amReqs,
RMApp rmApp) |
RMAppAttemptImpl(org.apache.hadoop.yarn.api.records.ApplicationAttemptId appAttemptId,
RMContext rmContext,
YarnScheduler scheduler,
ApplicationMasterService masterService,
org.apache.hadoop.yarn.api.records.ApplicationSubmissionContext submissionContext,
org.apache.hadoop.conf.Configuration conf,
List<org.apache.hadoop.yarn.api.records.ResourceRequest> amReqs,
RMApp rmApp,
BlacklistManager amBlacklistManager) |
| Modifier and Type | Method and Description |
|---|---|
org.apache.hadoop.yarn.api.records.ApplicationAttemptReport |
createApplicationAttemptReport()
Create the Application attempt report from the
RMAppAttempt |
org.apache.hadoop.yarn.api.records.YarnApplicationAttemptState |
createApplicationAttemptState()
Create the external user-facing state of the attempt of ApplicationMaster
from the current state of the
RMAppAttempt. |
org.apache.hadoop.security.token.Token<org.apache.hadoop.yarn.security.client.ClientToAMTokenIdentifier> |
createClientToken(String client)
Create a token for authenticating a client connection to the app attempt
|
BlacklistManager |
getAMBlacklistManager()
Get the
BlacklistManager that manages blacklists for AM failures |
int |
getAMContainerExitStatus() |
org.apache.hadoop.security.token.Token<org.apache.hadoop.yarn.security.AMRMTokenIdentifier> |
getAMRMToken()
The AMRMToken belonging to this app attempt
|
int |
getAMRMTokenKeyId() |
org.apache.hadoop.yarn.api.records.ApplicationAttemptId |
getAppAttemptId()
Get the application attempt id for this
RMAppAttempt. |
RMAppAttemptState |
getAppAttemptState()
The state of the
RMAppAttempt. |
org.apache.hadoop.yarn.api.records.ApplicationResourceUsageReport |
getApplicationResourceUsageReport()
Get application container and resource usage information.
|
Set<String> |
getBlacklistedNodes() |
SecretKey |
getClientTokenMasterKey()
The master key for client-to-AM tokens for this app attempt.
|
String |
getDiagnostics()
Diagnostics information for the application attempt.
|
org.apache.hadoop.yarn.api.records.FinalApplicationStatus |
getFinalApplicationStatus()
The final status set by the AM.
|
ConcurrentMap<org.apache.hadoop.yarn.api.records.NodeId,List<org.apache.hadoop.yarn.api.records.ContainerStatus>> |
getFinishedContainersSentToAMReference()
The map of conatiners per Node that are already sent to the AM.
|
long |
getFinishTime()
the finish time of the application attempt.
|
String |
getHost()
The host on which the
RMAppAttempt is running/ran on. |
List<org.apache.hadoop.yarn.api.records.ContainerStatus> |
getJustFinishedContainers()
Return the list of last set of finished containers.
|
ConcurrentMap<org.apache.hadoop.yarn.api.records.NodeId,List<org.apache.hadoop.yarn.api.records.ContainerStatus>> |
getJustFinishedContainersReference()
Returns a reference to the map of last set of finished containers to the
corresponding node.
|
org.apache.hadoop.yarn.api.records.Container |
getMasterContainer()
The container on which the Application Master is running.
|
String |
getOriginalTrackingUrl()
The original url at which the status of the application attempt can be
accessed.
|
RMAppAttemptState |
getPreviousState()
The previous state of the
RMAppAttempt before the current state. |
float |
getProgress()
Progress for the application attempt.
|
RMAppAttemptState |
getRecoveredFinalState() |
RMAppAttemptMetrics |
getRMAppAttemptMetrics()
Get metrics from the
RMAppAttempt |
int |
getRpcPort()
The rpc port of the
RMAppAttempt. |
long |
getStartTime()
the start time of the application.
|
RMAppAttemptState |
getState()
The current state of the
RMAppAttempt. |
org.apache.hadoop.yarn.api.records.ApplicationSubmissionContext |
getSubmissionContext()
The application submission context for this
RMAppAttempt. |
String |
getTrackingUrl()
The url at which the status of the application attempt can be accessed.
|
String |
getWebProxyBase()
The base to be prepended to web URLs that are not relative, and the user
has been checked.
|
void |
handle(RMAppAttemptEvent event) |
protected void |
onInvalidTranstion(RMAppAttemptEventType rmAppAttemptEventType,
RMAppAttemptState state) |
List<org.apache.hadoop.yarn.api.records.ContainerStatus> |
pullJustFinishedContainers()
Return a list of the last set of finished containers, resetting the
finished containers to empty.
|
void |
recover(RMStateStore.RMState state) |
void |
setAMRMToken(org.apache.hadoop.security.token.Token<org.apache.hadoop.yarn.security.AMRMTokenIdentifier> lastToken) |
void |
setMasterContainer(org.apache.hadoop.yarn.api.records.Container container) |
void |
setRecoveredFinalState(RMAppAttemptState finalState) |
boolean |
shouldCountTowardsMaxAttemptRetry()
Return the flag which indicates whether the attempt failure should be
counted to attempt retry count.
|
void |
transferStateFromAttempt(RMAppAttempt attempt) |
void |
updateAMLaunchDiagnostics(String amLaunchDiagnostics)
To capture Launch diagnostics of the app.
|
public static final org.apache.hadoop.yarn.api.records.Priority AM_CONTAINER_PRIORITY
public RMAppAttemptImpl(org.apache.hadoop.yarn.api.records.ApplicationAttemptId appAttemptId,
RMContext rmContext,
YarnScheduler scheduler,
ApplicationMasterService masterService,
org.apache.hadoop.yarn.api.records.ApplicationSubmissionContext submissionContext,
org.apache.hadoop.conf.Configuration conf,
List<org.apache.hadoop.yarn.api.records.ResourceRequest> amReqs,
RMApp rmApp)
public RMAppAttemptImpl(org.apache.hadoop.yarn.api.records.ApplicationAttemptId appAttemptId,
RMContext rmContext,
YarnScheduler scheduler,
ApplicationMasterService masterService,
org.apache.hadoop.yarn.api.records.ApplicationSubmissionContext submissionContext,
org.apache.hadoop.conf.Configuration conf,
List<org.apache.hadoop.yarn.api.records.ResourceRequest> amReqs,
RMApp rmApp,
BlacklistManager amBlacklistManager)
public org.apache.hadoop.yarn.api.records.ApplicationAttemptId getAppAttemptId()
RMAppAttemptRMAppAttempt.getAppAttemptId in interface RMAppAttemptApplicationAttemptId for this RM attempt.public org.apache.hadoop.yarn.api.records.ApplicationSubmissionContext getSubmissionContext()
RMAppAttemptRMAppAttempt.getSubmissionContext in interface RMAppAttemptpublic org.apache.hadoop.yarn.api.records.FinalApplicationStatus getFinalApplicationStatus()
RMAppAttemptgetFinalApplicationStatus in interface RMAppAttemptpublic RMAppAttemptState getAppAttemptState()
RMAppAttemptRMAppAttempt.getAppAttemptState in interface RMAppAttemptRMAppAttemptState of this RMAppAttemptpublic String getHost()
RMAppAttemptRMAppAttempt is running/ran on.getHost in interface RMAppAttemptRMAppAttempt ran/is running on.public int getRpcPort()
RMAppAttemptRMAppAttempt.getRpcPort in interface RMAppAttemptRMAppAttempt to which the clients can connect
to.public String getTrackingUrl()
RMAppAttemptgetTrackingUrl in interface RMAppAttemptpublic String getOriginalTrackingUrl()
RMAppAttemptgetOriginalTrackingUrl in interface RMAppAttemptpublic String getWebProxyBase()
RMAppAttemptgetWebProxyBase in interface RMAppAttemptpublic SecretKey getClientTokenMasterKey()
RMAppAttemptgetClientTokenMasterKey in interface RMAppAttemptpublic org.apache.hadoop.security.token.Token<org.apache.hadoop.yarn.security.AMRMTokenIdentifier> getAMRMToken()
RMAppAttemptgetAMRMToken in interface RMAppAttempt@InterfaceAudience.Private public void setAMRMToken(org.apache.hadoop.security.token.Token<org.apache.hadoop.yarn.security.AMRMTokenIdentifier> lastToken)
@InterfaceAudience.Private public int getAMRMTokenKeyId()
public org.apache.hadoop.security.token.Token<org.apache.hadoop.yarn.security.client.ClientToAMTokenIdentifier> createClientToken(String client)
RMAppAttemptcreateClientToken in interface RMAppAttemptclient - the name of the client requesting the tokenpublic String getDiagnostics()
RMAppAttemptgetDiagnostics in interface RMAppAttemptpublic int getAMContainerExitStatus()
public float getProgress()
RMAppAttemptgetProgress in interface RMAppAttemptRMAppAttemptpublic List<org.apache.hadoop.yarn.api.records.ContainerStatus> getJustFinishedContainers()
RMAppAttemptgetJustFinishedContainers in interface RMAppAttemptpublic ConcurrentMap<org.apache.hadoop.yarn.api.records.NodeId,List<org.apache.hadoop.yarn.api.records.ContainerStatus>> getJustFinishedContainersReference()
RMAppAttemptgetJustFinishedContainersReference in interface RMAppAttemptpublic ConcurrentMap<org.apache.hadoop.yarn.api.records.NodeId,List<org.apache.hadoop.yarn.api.records.ContainerStatus>> getFinishedContainersSentToAMReference()
RMAppAttemptgetFinishedContainersSentToAMReference in interface RMAppAttemptpublic List<org.apache.hadoop.yarn.api.records.ContainerStatus> pullJustFinishedContainers()
RMAppAttemptpullJustFinishedContainers in interface RMAppAttemptpublic org.apache.hadoop.yarn.api.records.Container getMasterContainer()
RMAppAttemptgetMasterContainer in interface RMAppAttemptContainer on which the application master is running.@InterfaceAudience.Private public void setMasterContainer(org.apache.hadoop.yarn.api.records.Container container)
public void handle(RMAppAttemptEvent event)
handle in interface org.apache.hadoop.yarn.event.EventHandler<RMAppAttemptEvent>public org.apache.hadoop.yarn.api.records.ApplicationResourceUsageReport getApplicationResourceUsageReport()
RMAppAttemptgetApplicationResourceUsageReport in interface RMAppAttemptpublic void recover(RMStateStore.RMState state)
recover in interface Recoverablepublic void transferStateFromAttempt(RMAppAttempt attempt)
public boolean shouldCountTowardsMaxAttemptRetry()
RMAppAttemptThere failure types should not be counted to attempt retry count:
shouldCountTowardsMaxAttemptRetry in interface RMAppAttemptpublic BlacklistManager getAMBlacklistManager()
RMAppAttemptBlacklistManager that manages blacklists for AM failuresgetAMBlacklistManager in interface RMAppAttemptBlacklistManager that tracks AM failures.public long getStartTime()
RMAppAttemptgetStartTime in interface RMAppAttemptpublic RMAppAttemptState getState()
RMAppAttemptRMAppAttempt.getState in interface RMAppAttemptRMAppAttemptState for this application
attempt.public RMAppAttemptState getPreviousState()
RMAppAttemptRMAppAttempt before the current state.getPreviousState in interface RMAppAttemptRMAppAttempt before the current state
for this application attempt.public org.apache.hadoop.yarn.api.records.YarnApplicationAttemptState createApplicationAttemptState()
RMAppAttemptRMAppAttempt.createApplicationAttemptState in interface RMAppAttemptpublic org.apache.hadoop.yarn.api.records.ApplicationAttemptReport createApplicationAttemptReport()
RMAppAttemptRMAppAttemptcreateApplicationAttemptReport in interface RMAppAttemptApplicationAttemptReportpublic RMAppAttemptMetrics getRMAppAttemptMetrics()
RMAppAttemptRMAppAttemptgetRMAppAttemptMetrics in interface RMAppAttemptpublic long getFinishTime()
RMAppAttemptgetFinishTime in interface RMAppAttemptpublic void updateAMLaunchDiagnostics(String amLaunchDiagnostics)
RMAppAttemptupdateAMLaunchDiagnostics in interface RMAppAttemptamLaunchDiagnostics - amLaunchDiagnostics.public RMAppAttemptState getRecoveredFinalState()
public void setRecoveredFinalState(RMAppAttemptState finalState)
public Set<String> getBlacklistedNodes()
getBlacklistedNodes in interface RMAppAttemptprotected void onInvalidTranstion(RMAppAttemptEventType rmAppAttemptEventType, RMAppAttemptState state)
Copyright © 2008–2023 Apache Software Foundation. All rights reserved.