org.apache.hadoop.yarn.server.resourcemanager.rmapp
Class RMAppImpl

java.lang.Object
  extended by org.apache.hadoop.yarn.server.resourcemanager.rmapp.RMAppImpl
All Implemented Interfaces:
org.apache.hadoop.yarn.event.EventHandler<RMAppEvent>, RMApp

public class RMAppImpl
extends Object
implements RMApp


Constructor Summary
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, String clientTokenStr, ApplicationsStore.ApplicationStore appStore, YarnScheduler scheduler, ApplicationMasterService masterService, long submitTime)
           
 
Method Summary
 org.apache.hadoop.yarn.api.records.ApplicationReport createAndGetApplicationReport()
          To get the status of an application in the RM, this method can be used.
 org.apache.hadoop.yarn.api.records.ApplicationId getApplicationId()
          The application id for this RMApp.
 ApplicationsStore.ApplicationStore getApplicationStore()
          Application level metadata is stored in ApplicationsStore.ApplicationStore whicn can persist the information.
 RMAppAttempt getCurrentAppAttempt()
          RMApp can have multiple application attempts RMAppAttempt.
 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.setFinishApplicationStatus(FinalApplicationStatus).
 long getFinishTime()
          The finish time of the RMApp
 String getName()
          The name of the application as set in ApplicationSubmissionContext.setApplicationName(String).
 float getProgress()
          Progress of application.
 String getQueue()
          Each Application is submitted to a queue decided by ApplicationSubmissionContext.setQueue(String).
 RMAppAttempt getRMAppAttempt(org.apache.hadoop.yarn.api.records.ApplicationAttemptId appAttemptId)
          RMApp can have multiple application attempts RMAppAttempt.
 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)
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

RMAppImpl

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,
                 String clientTokenStr,
                 ApplicationsStore.ApplicationStore appStore,
                 YarnScheduler scheduler,
                 ApplicationMasterService masterService,
                 long submitTime)
Method Detail

getApplicationId

public org.apache.hadoop.yarn.api.records.ApplicationId getApplicationId()
Description copied from interface: RMApp
The application id for this RMApp.

Specified by:
getApplicationId in interface RMApp
Returns:
the ApplicationId for this RMApp.

getFinalApplicationStatus

public org.apache.hadoop.yarn.api.records.FinalApplicationStatus getFinalApplicationStatus()
Description copied from interface: RMApp
The final finish state of the AM when unregistering as in FinishApplicationMasterRequest.setFinishApplicationStatus(FinalApplicationStatus).

Specified by:
getFinalApplicationStatus in interface RMApp
Returns:
the final finish state of the AM as set in FinishApplicationMasterRequest.setFinishApplicationStatus(FinalApplicationStatus).

getState

public RMAppState getState()
Description copied from interface: RMApp
The current state of the RMApp.

Specified by:
getState in interface RMApp
Returns:
the current state RMAppState for this application.

getUser

public String getUser()
Description copied from interface: RMApp
The user who submitted this application.

Specified by:
getUser in interface RMApp
Returns:
the user who submitted the application.

getProgress

public float getProgress()
Description copied from interface: RMApp
Progress of application.

Specified by:
getProgress in interface RMApp
Returns:
the progress of the RMApp.

getRMAppAttempt

public RMAppAttempt getRMAppAttempt(org.apache.hadoop.yarn.api.records.ApplicationAttemptId appAttemptId)
Description copied from interface: RMApp
RMApp can have multiple application attempts RMAppAttempt. This method returns the RMAppAttempt corresponding to ApplicationAttemptId.

Specified by:
getRMAppAttempt in interface RMApp
Parameters:
appAttemptId - the application attempt id
Returns:
the RMAppAttempt corresponding to the ApplicationAttemptId.

getQueue

public String getQueue()
Description copied from interface: RMApp
Each Application is submitted to a queue decided by ApplicationSubmissionContext.setQueue(String). This method returns the queue to which an application was submitted.

Specified by:
getQueue in interface RMApp
Returns:
the queue to which the application was submitted to.

getName

public String getName()
Description copied from interface: RMApp
The name of the application as set in ApplicationSubmissionContext.setApplicationName(String).

Specified by:
getName in interface RMApp
Returns:
the name of the application.

getCurrentAppAttempt

public RMAppAttempt getCurrentAppAttempt()
Description copied from interface: RMApp
RMApp can have multiple application attempts RMAppAttempt. This method returns the current RMAppAttempt.

Specified by:
getCurrentAppAttempt in interface RMApp
Returns:
the current RMAppAttempt

getApplicationStore

public ApplicationsStore.ApplicationStore getApplicationStore()
Description copied from interface: RMApp
Application level metadata is stored in ApplicationsStore.ApplicationStore whicn can persist the information.

Specified by:
getApplicationStore in interface RMApp
Returns:
the ApplicationsStore.ApplicationStore for this RMApp.

createAndGetApplicationReport

public org.apache.hadoop.yarn.api.records.ApplicationReport createAndGetApplicationReport()
Description copied from interface: RMApp
To get the status of an application in the RM, this method can be used.

Specified by:
createAndGetApplicationReport in interface RMApp
Returns:
the ApplicationReport detailing the status of the application.

getFinishTime

public long getFinishTime()
Description copied from interface: RMApp
The finish time of the RMApp

Specified by:
getFinishTime in interface RMApp
Returns:
the finish time of the application.,

getStartTime

public long getStartTime()
Description copied from interface: RMApp
the start time of the application.

Specified by:
getStartTime in interface RMApp
Returns:
the start time of the application.

getSubmitTime

public long getSubmitTime()
Description copied from interface: RMApp
the submit time of the application.

Specified by:
getSubmitTime in interface RMApp
Returns:
the submit time of the application.

getTrackingUrl

public String getTrackingUrl()
Description copied from interface: RMApp
The tracking url for the application master.

Specified by:
getTrackingUrl in interface RMApp
Returns:
the tracking url for the application master.

getDiagnostics

public StringBuilder getDiagnostics()
Description copied from interface: RMApp
the diagnostics information for the application master.

Specified by:
getDiagnostics in interface RMApp
Returns:
the diagnostics information for the application master.

handle

public void handle(RMAppEvent event)
Specified by:
handle in interface org.apache.hadoop.yarn.event.EventHandler<RMAppEvent>


Copyright © 2012 Apache Software Foundation. All Rights Reserved.