org.apache.hadoop.yarn.server.resourcemanager.rmapp.attempt
Interface RMAppAttempt

All Superinterfaces:
org.apache.hadoop.yarn.event.EventHandler<RMAppAttemptEvent>
All Known Implementing Classes:
RMAppAttemptImpl

public interface RMAppAttempt
extends org.apache.hadoop.yarn.event.EventHandler<RMAppAttemptEvent>

Interface to an Application Attempt in the Resource Manager. A RMApp can have multiple app attempts based on YarnConfiguration.RM_AM_MAX_ATTEMPTS. For specific implementation take a look at RMAppAttemptImpl.


Method Summary
 org.apache.hadoop.security.token.Token<org.apache.hadoop.yarn.security.client.ClientToAMTokenIdentifier> createClientToken(String clientName)
          Create a token for authenticating a client connection to the app attempt
 org.apache.hadoop.security.token.Token<org.apache.hadoop.yarn.security.AMRMTokenIdentifier> getAMRMToken()
          The AMRMToken belonging to this app attempt
 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.
 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.
 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.
 long getStartTime()
          the start time of the application.
 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.
 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.
 
Methods inherited from interface org.apache.hadoop.yarn.event.EventHandler
handle
 

Method Detail

getAppAttemptId

org.apache.hadoop.yarn.api.records.ApplicationAttemptId getAppAttemptId()
Get the application attempt id for this RMAppAttempt.

Returns:
the ApplicationAttemptId for this RM attempt.

getAppAttemptState

RMAppAttemptState getAppAttemptState()
The state of the RMAppAttempt.

Returns:
the state RMAppAttemptState of this RMAppAttempt

getHost

String getHost()
The host on which the RMAppAttempt is running/ran on.

Returns:
the host on which the RMAppAttempt ran/is running on.

getRpcPort

int getRpcPort()
The rpc port of the RMAppAttempt.

Returns:
the rpc port of the RMAppAttempt to which the clients can connect to.

getTrackingUrl

String getTrackingUrl()
The url at which the status of the application attempt can be accessed.

Returns:
the url at which the status of the attempt can be accessed.

getOriginalTrackingUrl

String getOriginalTrackingUrl()
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.

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

getWebProxyBase

String getWebProxyBase()
The base to be prepended to web URLs that are not relative, and the user has been checked.

Returns:
the base URL to be prepended to web URLs that are not relative.

getDiagnostics

String getDiagnostics()
Diagnostics information for the application attempt.

Returns:
diagnostics information for the application attempt.

getProgress

float getProgress()
Progress for the application attempt.

Returns:
the progress for this RMAppAttempt

getFinalApplicationStatus

org.apache.hadoop.yarn.api.records.FinalApplicationStatus getFinalApplicationStatus()
The final status set by the AM.

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

getRanNodes

Set<org.apache.hadoop.yarn.api.records.NodeId> getRanNodes()
Nodes on which the containers for this RMAppAttempt ran.

Returns:
the set of nodes that ran any containers from this RMAppAttempt

pullJustFinishedContainers

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.

Returns:
the list of just finished containers, re setting the finished containers.

getJustFinishedContainers

List<org.apache.hadoop.yarn.api.records.ContainerStatus> getJustFinishedContainers()
Return the list of last set of finished containers. This does not reset the finished containers.

Returns:
the list of just finished contianers, this does not reset the finished containers.

getMasterContainer

org.apache.hadoop.yarn.api.records.Container getMasterContainer()
The container on which the Application Master is running.

Returns:
the Container on which the application master is running.

getSubmissionContext

org.apache.hadoop.yarn.api.records.ApplicationSubmissionContext getSubmissionContext()
The application submission context for this RMAppAttempt.

Returns:
the application submission context for this Application.

getAMRMToken

org.apache.hadoop.security.token.Token<org.apache.hadoop.yarn.security.AMRMTokenIdentifier> getAMRMToken()
The AMRMToken belonging to this app attempt

Returns:
The AMRMToken belonging to this app attempt

getClientTokenMasterKey

@InterfaceAudience.LimitedPrivate(value="RMStateStore")
SecretKey getClientTokenMasterKey()
The master key for client-to-AM tokens for this app attempt. This is only used for RMStateStore. Normal operation must invoke the secret manager to get the key and not use the local key directly.

Returns:
The master key for client-to-AM tokens for this app attempt

createClientToken

org.apache.hadoop.security.token.Token<org.apache.hadoop.yarn.security.client.ClientToAMTokenIdentifier> createClientToken(String clientName)
Create a token for authenticating a client connection to the app attempt

Parameters:
clientName - the name of the client requesting the token
Returns:
the token or null if the attempt is not running

getApplicationResourceUsageReport

org.apache.hadoop.yarn.api.records.ApplicationResourceUsageReport getApplicationResourceUsageReport()
Get application container and resource usage information.

Returns:
an ApplicationResourceUsageReport object.

getStartTime

long getStartTime()
the start time of the application.

Returns:
the start time of the application.


Copyright © 2014 Apache Software Foundation. All Rights Reserved.