org.apache.hadoop.yarn.server.resourcemanager.rmapp.attempt
Class RMAppAttemptImpl

java.lang.Object
  extended by org.apache.hadoop.yarn.server.resourcemanager.rmapp.attempt.RMAppAttemptImpl
All Implemented Interfaces:
org.apache.hadoop.yarn.event.EventHandler<RMAppAttemptEvent>, RMAppAttempt

public class RMAppAttemptImpl
extends Object
implements RMAppAttempt


Field Summary
static org.apache.hadoop.yarn.api.records.Priority AM_CONTAINER_PRIORITY
           
 
Constructor Summary
RMAppAttemptImpl(org.apache.hadoop.yarn.api.records.ApplicationAttemptId appAttemptId, String clientToken, RMContext rmContext, YarnScheduler scheduler, ApplicationMasterService masterService, org.apache.hadoop.yarn.api.records.ApplicationSubmissionContext submissionContext, String proxy)
           
 
Method Summary
 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()
           
 String getClientToken()
          The token required by the clients to talk to the application attempt
 String getDiagnostics()
          Diagnostics information for the application attempt.
 org.apache.hadoop.yarn.api.records.FinalApplicationStatus getFinalApplicationStatus()
          The final status set by the AM.
 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.
 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.
 float getProgress()
          Progress for the application attempt.
 Set<org.apache.hadoop.yarn.api.records.NodeId> getRanNodes()
          Nodes on which the containers for this RMAppAttempt ran.
 int getRpcPort()
          The rpc port 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)
           
 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 setDiagnostics(String message)
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

AM_CONTAINER_PRIORITY

public static final org.apache.hadoop.yarn.api.records.Priority AM_CONTAINER_PRIORITY
Constructor Detail

RMAppAttemptImpl

public RMAppAttemptImpl(org.apache.hadoop.yarn.api.records.ApplicationAttemptId appAttemptId,
                        String clientToken,
                        RMContext rmContext,
                        YarnScheduler scheduler,
                        ApplicationMasterService masterService,
                        org.apache.hadoop.yarn.api.records.ApplicationSubmissionContext submissionContext,
                        String proxy)
Method Detail

getAppAttemptId

public org.apache.hadoop.yarn.api.records.ApplicationAttemptId getAppAttemptId()
Description copied from interface: RMAppAttempt
Get the application attempt id for this RMAppAttempt.

Specified by:
getAppAttemptId in interface RMAppAttempt
Returns:
the ApplicationAttemptId for this RM attempt.

getSubmissionContext

public org.apache.hadoop.yarn.api.records.ApplicationSubmissionContext getSubmissionContext()
Description copied from interface: RMAppAttempt
The application submission context for this RMAppAttempt.

Specified by:
getSubmissionContext in interface RMAppAttempt
Returns:
the application submission context for this Application.

getFinalApplicationStatus

public org.apache.hadoop.yarn.api.records.FinalApplicationStatus getFinalApplicationStatus()
Description copied from interface: RMAppAttempt
The final status set by the AM.

Specified by:
getFinalApplicationStatus in interface RMAppAttempt
Returns:
the final status that is set by the AM when unregistering itself. Can return a null if the AM has not unregistered itself.

getAppAttemptState

public RMAppAttemptState getAppAttemptState()
Description copied from interface: RMAppAttempt
The state of the RMAppAttempt.

Specified by:
getAppAttemptState in interface RMAppAttempt
Returns:
the state RMAppAttemptState of this RMAppAttempt

getHost

public String getHost()
Description copied from interface: RMAppAttempt
The host on which the RMAppAttempt is running/ran on.

Specified by:
getHost in interface RMAppAttempt
Returns:
the host on which the RMAppAttempt ran/is running on.

getRpcPort

public int getRpcPort()
Description copied from interface: RMAppAttempt
The rpc port of the RMAppAttempt.

Specified by:
getRpcPort in interface RMAppAttempt
Returns:
the rpc port of the RMAppAttempt to which the clients can connect to.

getTrackingUrl

public String getTrackingUrl()
Description copied from interface: RMAppAttempt
The url at which the status of the application attempt can be accessed.

Specified by:
getTrackingUrl in interface RMAppAttempt
Returns:
the url at which the status of the attempt can be accessed.

getOriginalTrackingUrl

public String getOriginalTrackingUrl()
Description copied from interface: RMAppAttempt
The original url at which the status of the application attempt can be accessed. This url is not fronted by a proxy. This is only intended to be used by the proxy.

Specified by:
getOriginalTrackingUrl in interface RMAppAttempt
Returns:
the url at which the status of the attempt can be accessed and is not fronted by a proxy.

getWebProxyBase

public String getWebProxyBase()
Description copied from interface: RMAppAttempt
The base to be prepended to web URLs that are not relative, and the user has been checked.

Specified by:
getWebProxyBase in interface RMAppAttempt
Returns:
the base URL to be prepended to web URLs that are not relative.

getClientToken

public String getClientToken()
Description copied from interface: RMAppAttempt
The token required by the clients to talk to the application attempt

Specified by:
getClientToken in interface RMAppAttempt
Returns:
the token required by the clients to talk to the application attempt

getDiagnostics

public String getDiagnostics()
Description copied from interface: RMAppAttempt
Diagnostics information for the application attempt.

Specified by:
getDiagnostics in interface RMAppAttempt
Returns:
diagnostics information for the application attempt.

setDiagnostics

public void setDiagnostics(String message)

getProgress

public float getProgress()
Description copied from interface: RMAppAttempt
Progress for the application attempt.

Specified by:
getProgress in interface RMAppAttempt
Returns:
the progress for this RMAppAttempt

getJustFinishedContainers

public List<org.apache.hadoop.yarn.api.records.ContainerStatus> getJustFinishedContainers()
Description copied from interface: RMAppAttempt
Return the list of last set of finished containers. This does not reset the finished containers.

Specified by:
getJustFinishedContainers in interface RMAppAttempt
Returns:
the list of just finished contianers, this does not reset the finished containers.

pullJustFinishedContainers

public List<org.apache.hadoop.yarn.api.records.ContainerStatus> pullJustFinishedContainers()
Description copied from interface: RMAppAttempt
Return a list of the last set of finished containers, resetting the finished containers to empty.

Specified by:
pullJustFinishedContainers in interface RMAppAttempt
Returns:
the list of just finished containers, re setting the finished containers.

getRanNodes

public Set<org.apache.hadoop.yarn.api.records.NodeId> getRanNodes()
Description copied from interface: RMAppAttempt
Nodes on which the containers for this RMAppAttempt ran.

Specified by:
getRanNodes in interface RMAppAttempt
Returns:
the set of nodes that ran any containers from this RMAppAttempt

getMasterContainer

public org.apache.hadoop.yarn.api.records.Container getMasterContainer()
Description copied from interface: RMAppAttempt
The container on which the Application Master is running.

Specified by:
getMasterContainer in interface RMAppAttempt
Returns:
the Container on which the application master is running.

handle

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

getApplicationResourceUsageReport

public org.apache.hadoop.yarn.api.records.ApplicationResourceUsageReport getApplicationResourceUsageReport()
Specified by:
getApplicationResourceUsageReport in interface RMAppAttempt


Copyright © 2012 Apache Software Foundation. All Rights Reserved.