public class RMAppImpl extends Object implements RMApp, Recoverable
| Constructor and Description | 
|---|
| RMAppImpl(org.apache.hadoop.yarn.api.records.ApplicationId applicationId,
         RMContext rmContext,
         org.apache.hadoop.conf.Configuration config,
         String name,
         String user,
         String queue,
         org.apache.hadoop.yarn.api.records.ApplicationSubmissionContext submissionContext,
         YarnScheduler scheduler,
         ApplicationMasterService masterService,
         long submitTime,
         String applicationType,
         Set<String> applicationTags,
         List<org.apache.hadoop.yarn.api.records.ResourceRequest> amReqs) | 
| RMAppImpl(org.apache.hadoop.yarn.api.records.ApplicationId applicationId,
         RMContext rmContext,
         org.apache.hadoop.conf.Configuration config,
         String name,
         String user,
         String queue,
         org.apache.hadoop.yarn.api.records.ApplicationSubmissionContext submissionContext,
         YarnScheduler scheduler,
         ApplicationMasterService masterService,
         long submitTime,
         String applicationType,
         Set<String> applicationTags,
         List<org.apache.hadoop.yarn.api.records.ResourceRequest> amReqs,
         ApplicationPlacementContext placementContext,
         long startTime) | 
| RMAppImpl(org.apache.hadoop.yarn.api.records.ApplicationId applicationId,
         RMContext rmContext,
         org.apache.hadoop.conf.Configuration config,
         String name,
         org.apache.hadoop.security.UserGroupInformation userUgi,
         String queue,
         org.apache.hadoop.yarn.api.records.ApplicationSubmissionContext submissionContext,
         YarnScheduler scheduler,
         ApplicationMasterService masterService,
         long submitTime,
         String applicationType,
         Set<String> applicationTags,
         List<org.apache.hadoop.yarn.api.records.ResourceRequest> amReqs,
         ApplicationPlacementContext placementContext,
         long startTime) | 
| Modifier and Type | Method and Description | 
|---|---|
| void | aggregateLogReport(org.apache.hadoop.yarn.api.records.NodeId nodeId,
                  org.apache.hadoop.yarn.server.api.protocolrecords.LogAggregationReport report) | 
| org.apache.hadoop.yarn.api.records.ApplicationReport | createAndGetApplicationReport(String clientUserName,
                             boolean allowAccess)To get the status of an application in the RM, this method can be used. | 
| org.apache.hadoop.yarn.api.records.YarnApplicationState | createApplicationState()Create the external user-facing state of ApplicationMaster from the
 current state of the  RMApp. | 
| String | getAmNodeLabelExpression()Return the node label expression of the AM container. | 
| List<org.apache.hadoop.yarn.api.records.ResourceRequest> | getAMResourceRequests() | 
| Map<org.apache.hadoop.yarn.api.records.ApplicationAttemptId,RMAppAttempt> | getAppAttempts()RMAppcan have multiple application attemptsRMAppAttempt. | 
| org.apache.hadoop.yarn.api.records.ApplicationId | getApplicationId()The application id for this  RMApp. | 
| ApplicationPlacementContext | getApplicationPlacementContext()Get the application -> queue placement context | 
| org.apache.hadoop.yarn.api.records.Priority | getApplicationPriority()Get priority of the application. | 
| Map<String,String> | getApplicationSchedulingEnvs()Get the application scheduling environment variables. | 
| org.apache.hadoop.yarn.api.records.ApplicationSubmissionContext | getApplicationSubmissionContext()The application submission context for this  RMApp | 
| Set<String> | getApplicationTags()Get tags for the application | 
| Map<org.apache.hadoop.yarn.api.records.ApplicationTimeoutType,Long> | getApplicationTimeouts() | 
| String | getApplicationType()Returns the application type | 
| String | getAppNodeLabelExpression() | 
| org.apache.hadoop.ipc.CallerContext | getCallerContext() | 
| org.apache.hadoop.yarn.server.api.records.AppCollectorData | getCollectorData()The timeline collector information for the application. | 
| org.apache.hadoop.yarn.api.records.CollectorInfo | getCollectorInfo()The timeline collector information to be sent to AM. | 
| RMAppAttempt | getCurrentAppAttempt()RMAppcan have multiple application attemptsRMAppAttempt. | 
| StringBuilder | getDiagnostics()the diagnostics information for the application master. | 
| org.apache.hadoop.yarn.api.records.FinalApplicationStatus | getFinalApplicationStatus()The final finish state of the AM when unregistering as in
  FinishApplicationMasterRequest.setFinalApplicationStatus(FinalApplicationStatus). | 
| long | getFinishTime()The finish time of the  RMApp | 
| long | getLaunchTime()The launch time of the application. | 
| String | getLogAggregationFailureMessagesForNM(org.apache.hadoop.yarn.api.records.NodeId nodeId) | 
| Map<org.apache.hadoop.yarn.api.records.NodeId,org.apache.hadoop.yarn.server.api.protocolrecords.LogAggregationReport> | getLogAggregationReportsForApp() | 
| org.apache.hadoop.yarn.api.records.LogAggregationStatus | getLogAggregationStatusForAppReport() | 
| int | getMaxAppAttempts()The number of max attempts of the application. | 
| String | getName()The name of the application as set in  ApplicationSubmissionContext.setApplicationName(String). | 
| int | getNextAttemptId() | 
| int | getNumFailedAppAttempts() | 
| String | getOriginalTrackingUrl()The original tracking url for the application master. | 
| float | getProgress()Progress of application. | 
| String | getQueue()Each Application is submitted to a queue decided by  ApplicationSubmissionContext.setQueue(String). | 
| Set<org.apache.hadoop.yarn.api.records.NodeId> | getRanNodes()Nodes on which the containers for this  RMAppran. | 
| String | getRealUser() | 
| RMAppState | getRecoveredFinalState() | 
| org.apache.hadoop.yarn.api.records.ReservationId | getReservationId() | 
| RMAppAttempt | getRMAppAttempt(org.apache.hadoop.yarn.api.records.ApplicationAttemptId appAttemptId)RMAppcan have multiple application attemptsRMAppAttempt. | 
| RMAppMetrics | getRMAppMetrics()Get RMAppMetrics of the  RMApp. | 
| long | getStartTime()the start time of the application. | 
| RMAppState | getState()The current state of the  RMApp. | 
| long | getSubmitTime()the submit time of the application. | 
| String | getTrackingUrl()The tracking url for the application master. | 
| String | getUser()The user who submitted this application. | 
| void | handle(RMAppEvent event) | 
| boolean | isAppFinalStateStored()Check whether this application's state has been saved to the state store. | 
| boolean | isAppInCompletedStates()To verify whether app has reached in its completing/completed states. | 
| static boolean | isAppInFinalState(RMApp rmApp) | 
| protected void | onInvalidStateTransition(RMAppEventType rmAppEventType,
                        RMAppState state)catch the InvalidStateTransition. | 
| int | pullRMNodeUpdates(Map<RMNode,org.apache.hadoop.yarn.api.records.NodeUpdateType> upNodes)To receive the collection of all  RMNodes whose updates have been
 received by the RMApp. | 
| void | recover(RMStateStore.RMState state) | 
| void | removeCollectorData() | 
| void | setApplicationPriority(org.apache.hadoop.yarn.api.records.Priority applicationPriority) | 
| void | setCollectorData(org.apache.hadoop.yarn.server.api.records.AppCollectorData incomingData) | 
| void | setQueue(String queue)Reflects a change in the application's queue from the one specified in the
  ApplicationSubmissionContext. | 
| void | setSystemClock(org.apache.hadoop.yarn.util.Clock clock) | 
| void | startTimelineCollector()Starts the application level timeline collector for this app. | 
| void | stopTimelineCollector()Stops the application level timeline collector for this app. | 
| void | updateApplicationTimeout(Map<org.apache.hadoop.yarn.api.records.ApplicationTimeoutType,Long> updateTimeout) | 
public RMAppImpl(org.apache.hadoop.yarn.api.records.ApplicationId applicationId,
                 RMContext rmContext,
                 org.apache.hadoop.conf.Configuration config,
                 String name,
                 String user,
                 String queue,
                 org.apache.hadoop.yarn.api.records.ApplicationSubmissionContext submissionContext,
                 YarnScheduler scheduler,
                 ApplicationMasterService masterService,
                 long submitTime,
                 String applicationType,
                 Set<String> applicationTags,
                 List<org.apache.hadoop.yarn.api.records.ResourceRequest> amReqs)
public RMAppImpl(org.apache.hadoop.yarn.api.records.ApplicationId applicationId,
                 RMContext rmContext,
                 org.apache.hadoop.conf.Configuration config,
                 String name,
                 String user,
                 String queue,
                 org.apache.hadoop.yarn.api.records.ApplicationSubmissionContext submissionContext,
                 YarnScheduler scheduler,
                 ApplicationMasterService masterService,
                 long submitTime,
                 String applicationType,
                 Set<String> applicationTags,
                 List<org.apache.hadoop.yarn.api.records.ResourceRequest> amReqs,
                 ApplicationPlacementContext placementContext,
                 long startTime)
public RMAppImpl(org.apache.hadoop.yarn.api.records.ApplicationId applicationId,
                 RMContext rmContext,
                 org.apache.hadoop.conf.Configuration config,
                 String name,
                 org.apache.hadoop.security.UserGroupInformation userUgi,
                 String queue,
                 org.apache.hadoop.yarn.api.records.ApplicationSubmissionContext submissionContext,
                 YarnScheduler scheduler,
                 ApplicationMasterService masterService,
                 long submitTime,
                 String applicationType,
                 Set<String> applicationTags,
                 List<org.apache.hadoop.yarn.api.records.ResourceRequest> amReqs,
                 ApplicationPlacementContext placementContext,
                 long startTime)
public void startTimelineCollector()
public void stopTimelineCollector()
public org.apache.hadoop.yarn.api.records.ApplicationId getApplicationId()
RMAppRMApp.getApplicationId in interface RMAppApplicationId for this RMApp.public org.apache.hadoop.yarn.api.records.ApplicationSubmissionContext getApplicationSubmissionContext()
RMAppRMAppgetApplicationSubmissionContext in interface RMAppApplicationSubmissionContext for this RMApppublic org.apache.hadoop.yarn.api.records.FinalApplicationStatus getFinalApplicationStatus()
RMAppFinishApplicationMasterRequest.setFinalApplicationStatus(FinalApplicationStatus).getFinalApplicationStatus in interface RMAppFinishApplicationMasterRequest.setFinalApplicationStatus(FinalApplicationStatus).public RMAppState getState()
RMAppRMApp.getState in interface RMAppRMAppState for this application.public String getUser()
RMApppublic float getProgress()
RMAppgetProgress in interface RMAppRMApp.public RMAppAttempt getRMAppAttempt(org.apache.hadoop.yarn.api.records.ApplicationAttemptId appAttemptId)
RMAppRMApp can have multiple application attempts RMAppAttempt.
 This method returns the RMAppAttempt corresponding to
  ApplicationAttemptId.getRMAppAttempt in interface RMAppappAttemptId - the application attempt idRMAppAttempt corresponding to the ApplicationAttemptId.public String getQueue()
RMAppApplicationSubmissionContext.setQueue(String).
 This method returns the queue to which an application was submitted.public void setQueue(String queue)
RMAppApplicationSubmissionContext.public org.apache.hadoop.yarn.server.api.records.AppCollectorData getCollectorData()
RMAppgetCollectorData in interface RMApppublic void setCollectorData(org.apache.hadoop.yarn.server.api.records.AppCollectorData incomingData)
public org.apache.hadoop.yarn.api.records.CollectorInfo getCollectorInfo()
RMAppgetCollectorInfo in interface RMApppublic void removeCollectorData()
public String getName()
RMAppApplicationSubmissionContext.setApplicationName(String).public RMAppAttempt getCurrentAppAttempt()
RMAppRMApp can have multiple application attempts RMAppAttempt.
 This method returns the current RMAppAttempt.getCurrentAppAttempt in interface RMAppRMAppAttemptpublic Map<org.apache.hadoop.yarn.api.records.ApplicationAttemptId,RMAppAttempt> getAppAttempts()
RMAppRMApp can have multiple application attempts RMAppAttempt.
 This method returns the all RMAppAttempts for the RMApp.getAppAttempts in interface RMAppRMAppAttempts for the RMApp.public int pullRMNodeUpdates(Map<RMNode,org.apache.hadoop.yarn.api.records.NodeUpdateType> upNodes)
RMAppRMNodes whose updates have been
 received by the RMApp. Updates can be node becoming lost or becoming
 healthy etc. The method clears the information from the RMApp. So
 each call to this method gives the delta from the previous call.pullRMNodeUpdates in interface RMAppupNodes - Map into which the updates are transferred, with each
 node updates as the key, and the NodeUpdateType for that update
 as the corresponding value.Mappublic org.apache.hadoop.yarn.api.records.ApplicationReport createAndGetApplicationReport(String clientUserName, boolean allowAccess)
RMAppcreateAndGetApplicationReport in interface RMAppclientUserName - the user name of the client requesting the reportallowAccess - whether to allow full access to the reportApplicationReport detailing the status of the application.public long getFinishTime()
RMAppRMAppgetFinishTime in interface RMApppublic long getStartTime()
RMAppgetStartTime in interface RMApppublic long getLaunchTime()
RMAppgetLaunchTime in interface RMApppublic long getSubmitTime()
RMAppgetSubmitTime in interface RMApppublic String getTrackingUrl()
RMAppgetTrackingUrl in interface RMApppublic String getOriginalTrackingUrl()
RMAppgetOriginalTrackingUrl in interface RMApppublic StringBuilder getDiagnostics()
RMAppgetDiagnostics in interface RMApppublic int getMaxAppAttempts()
RMAppgetMaxAppAttempts in interface RMApppublic void handle(RMAppEvent event)
handle in interface org.apache.hadoop.yarn.event.EventHandler<RMAppEvent>public void recover(RMStateStore.RMState state)
recover in interface Recoverablepublic int getNumFailedAppAttempts()
public String getApplicationType()
RMAppgetApplicationType in interface RMApppublic Set<String> getApplicationTags()
RMAppgetApplicationTags in interface RMApppublic boolean isAppFinalStateStored()
RMAppisAppFinalStateStored in interface RMApppublic org.apache.hadoop.yarn.api.records.YarnApplicationState createApplicationState()
RMAppRMApp.createApplicationState in interface RMApppublic static boolean isAppInFinalState(RMApp rmApp)
public boolean isAppInCompletedStates()
RMAppisAppInCompletedStates in interface RMApppublic ApplicationPlacementContext getApplicationPlacementContext()
RMAppgetApplicationPlacementContext in interface RMApppublic RMAppState getRecoveredFinalState()
public Set<org.apache.hadoop.yarn.api.records.NodeId> getRanNodes()
RMAppRMApp ran.getRanNodes in interface RMAppRMApp
 Add more node on which containers for this RMApp ranpublic RMAppMetrics getRMAppMetrics()
RMAppRMApp.getRMAppMetrics in interface RMApp@InterfaceAudience.Private public void setSystemClock(org.apache.hadoop.yarn.util.Clock clock)
public org.apache.hadoop.yarn.api.records.ReservationId getReservationId()
getReservationId in interface RMApppublic List<org.apache.hadoop.yarn.api.records.ResourceRequest> getAMResourceRequests()
getAMResourceRequests in interface RMApppublic Map<org.apache.hadoop.yarn.api.records.NodeId,org.apache.hadoop.yarn.server.api.protocolrecords.LogAggregationReport> getLogAggregationReportsForApp()
getLogAggregationReportsForApp in interface RMApppublic void aggregateLogReport(org.apache.hadoop.yarn.api.records.NodeId nodeId,
                               org.apache.hadoop.yarn.server.api.protocolrecords.LogAggregationReport report)
public String getLogAggregationFailureMessagesForNM(org.apache.hadoop.yarn.api.records.NodeId nodeId)
public org.apache.hadoop.yarn.api.records.LogAggregationStatus getLogAggregationStatusForAppReport()
getLogAggregationStatusForAppReport in interface RMApppublic String getAppNodeLabelExpression()
getAppNodeLabelExpression in interface RMApppublic String getAmNodeLabelExpression()
RMAppgetAmNodeLabelExpression in interface RMApppublic org.apache.hadoop.ipc.CallerContext getCallerContext()
getCallerContext in interface RMApp@InterfaceAudience.Private public int getNextAttemptId()
public Map<org.apache.hadoop.yarn.api.records.ApplicationTimeoutType,Long> getApplicationTimeouts()
getApplicationTimeouts in interface RMApppublic void updateApplicationTimeout(Map<org.apache.hadoop.yarn.api.records.ApplicationTimeoutType,Long> updateTimeout)
public org.apache.hadoop.yarn.api.records.Priority getApplicationPriority()
RMAppgetApplicationPriority in interface RMApppublic void setApplicationPriority(org.apache.hadoop.yarn.api.records.Priority applicationPriority)
public Map<String,String> getApplicationSchedulingEnvs()
RMAppgetApplicationSchedulingEnvs in interface RMAppprotected void onInvalidStateTransition(RMAppEventType rmAppEventType, RMAppState state)
state - rmAppEventType - public String getRealUser()
getRealUser in interface RMAppCopyright © 2008–2023 Apache Software Foundation. All rights reserved.