org.apache.hadoop.yarn.api.records
Class ApplicationReport

java.lang.Object
  extended by org.apache.hadoop.yarn.api.records.ApplicationReport

@InterfaceAudience.Public
@InterfaceStability.Stable
public abstract class ApplicationReport
extends Object

ApplicationReport is a report of an application.

It includes details such as:

See Also:
ApplicationClientProtocol.getApplicationReport(org.apache.hadoop.yarn.api.protocolrecords.GetApplicationReportRequest)

Constructor Summary
ApplicationReport()
           
 
Method Summary
abstract  Token getAMRMToken()
          Get the AMRM token of the application.
abstract  ApplicationId getApplicationId()
          Get the ApplicationId of the application.
abstract  ApplicationResourceUsageReport getApplicationResourceUsageReport()
          Retrieve the structure containing the job resources for this application
abstract  String getApplicationType()
          Get the application's Type
abstract  Token getClientToAMToken()
          Get the client token for communicating with the ApplicationMaster.
abstract  ApplicationAttemptId getCurrentApplicationAttemptId()
          Get the ApplicationAttemptId of the current attempt of the application
abstract  String getDiagnostics()
          Get the diagnositic information of the application in case of errors.
abstract  FinalApplicationStatus getFinalApplicationStatus()
          Get the final finish status of the application.
abstract  long getFinishTime()
          Get the finish time of the application.
abstract  String getHost()
          Get the host on which the ApplicationMaster is running.
abstract  String getName()
          Get the user-defined name of the application.
abstract  String getOriginalTrackingUrl()
          Get the original not-proxied tracking url for the application.
abstract  float getProgress()
          Get the application's progress ( range 0.0 to 1.0 )
abstract  String getQueue()
          Get the queue to which the application was submitted.
abstract  int getRpcPort()
          Get the RPC port of the ApplicationMaster.
abstract  long getStartTime()
          Get the start time of the application.
abstract  String getTrackingUrl()
          Get the tracking url for the application.
abstract  String getUser()
          Get the user who submitted the application.
abstract  YarnApplicationState getYarnApplicationState()
          Get the YarnApplicationState of the application.
static ApplicationReport newInstance(ApplicationId applicationId, ApplicationAttemptId applicationAttemptId, String user, String queue, String name, String host, int rpcPort, Token clientToAMToken, YarnApplicationState state, String diagnostics, String url, long startTime, long finishTime, FinalApplicationStatus finalStatus, ApplicationResourceUsageReport appResources, String origTrackingUrl, float progress, String applicationType, Token amRmToken)
           
abstract  void setAMRMToken(Token amRmToken)
           
abstract  void setApplicationId(ApplicationId applicationId)
           
abstract  void setApplicationResourceUsageReport(ApplicationResourceUsageReport appResources)
          Store the structure containing the job resources for this application
abstract  void setApplicationType(String applicationType)
           
abstract  void setClientToAMToken(Token clientToAMToken)
           
abstract  void setCurrentApplicationAttemptId(ApplicationAttemptId applicationAttemptId)
           
abstract  void setDiagnostics(String diagnostics)
           
abstract  void setFinalApplicationStatus(FinalApplicationStatus finishState)
           
abstract  void setFinishTime(long finishTime)
           
abstract  void setHost(String host)
           
abstract  void setName(String name)
           
abstract  void setOriginalTrackingUrl(String url)
           
abstract  void setProgress(float progress)
           
abstract  void setQueue(String queue)
           
abstract  void setRpcPort(int rpcPort)
           
abstract  void setStartTime(long startTime)
           
abstract  void setTrackingUrl(String url)
           
abstract  void setUser(String user)
           
abstract  void setYarnApplicationState(YarnApplicationState state)
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

ApplicationReport

public ApplicationReport()
Method Detail

newInstance

@InterfaceAudience.Private
@InterfaceStability.Unstable
public static ApplicationReport newInstance(ApplicationId applicationId,
                                                                                                  ApplicationAttemptId applicationAttemptId,
                                                                                                  String user,
                                                                                                  String queue,
                                                                                                  String name,
                                                                                                  String host,
                                                                                                  int rpcPort,
                                                                                                  Token clientToAMToken,
                                                                                                  YarnApplicationState state,
                                                                                                  String diagnostics,
                                                                                                  String url,
                                                                                                  long startTime,
                                                                                                  long finishTime,
                                                                                                  FinalApplicationStatus finalStatus,
                                                                                                  ApplicationResourceUsageReport appResources,
                                                                                                  String origTrackingUrl,
                                                                                                  float progress,
                                                                                                  String applicationType,
                                                                                                  Token amRmToken)

getApplicationId

@InterfaceAudience.Public
@InterfaceStability.Stable
public abstract ApplicationId getApplicationId()
Get the ApplicationId of the application.

Returns:
ApplicationId of the application

setApplicationId

@InterfaceAudience.Private
@InterfaceStability.Unstable
public abstract void setApplicationId(ApplicationId applicationId)

getCurrentApplicationAttemptId

@InterfaceAudience.Public
@InterfaceStability.Stable
public abstract ApplicationAttemptId getCurrentApplicationAttemptId()
Get the ApplicationAttemptId of the current attempt of the application

Returns:
ApplicationAttemptId of the attempt

setCurrentApplicationAttemptId

@InterfaceAudience.Private
@InterfaceStability.Unstable
public abstract void setCurrentApplicationAttemptId(ApplicationAttemptId applicationAttemptId)

getUser

@InterfaceAudience.Public
@InterfaceStability.Stable
public abstract String getUser()
Get the user who submitted the application.

Returns:
user who submitted the application

setUser

@InterfaceAudience.Private
@InterfaceStability.Unstable
public abstract void setUser(String user)

getQueue

@InterfaceAudience.Public
@InterfaceStability.Stable
public abstract String getQueue()
Get the queue to which the application was submitted.

Returns:
queue to which the application was submitted

setQueue

@InterfaceAudience.Private
@InterfaceStability.Unstable
public abstract void setQueue(String queue)

getName

@InterfaceAudience.Public
@InterfaceStability.Stable
public abstract String getName()
Get the user-defined name of the application.

Returns:
name of the application

setName

@InterfaceAudience.Private
@InterfaceStability.Unstable
public abstract void setName(String name)

getHost

@InterfaceAudience.Public
@InterfaceStability.Stable
public abstract String getHost()
Get the host on which the ApplicationMaster is running.

Returns:
host on which the ApplicationMaster is running

setHost

@InterfaceAudience.Private
@InterfaceStability.Unstable
public abstract void setHost(String host)

getRpcPort

@InterfaceAudience.Public
@InterfaceStability.Stable
public abstract int getRpcPort()
Get the RPC port of the ApplicationMaster.

Returns:
RPC port of the ApplicationMaster

setRpcPort

@InterfaceAudience.Private
@InterfaceStability.Unstable
public abstract void setRpcPort(int rpcPort)

getClientToAMToken

@InterfaceAudience.Public
@InterfaceStability.Stable
public abstract Token getClientToAMToken()
Get the client token for communicating with the ApplicationMaster.

ClientToAMToken is the security token used by the AMs to verify authenticity of any client.

The ResourceManager, provides a secure token (via getClientToAMToken()) which is verified by the ApplicationMaster when the client directly talks to an AM.

Returns:
client token for communicating with the ApplicationMaster

setClientToAMToken

@InterfaceAudience.Private
@InterfaceStability.Unstable
public abstract void setClientToAMToken(Token clientToAMToken)

getYarnApplicationState

@InterfaceAudience.Public
@InterfaceStability.Stable
public abstract YarnApplicationState getYarnApplicationState()
Get the YarnApplicationState of the application.

Returns:
YarnApplicationState of the application

setYarnApplicationState

@InterfaceAudience.Private
@InterfaceStability.Unstable
public abstract void setYarnApplicationState(YarnApplicationState state)

getDiagnostics

@InterfaceAudience.Public
@InterfaceStability.Stable
public abstract String getDiagnostics()
Get the diagnositic information of the application in case of errors.

Returns:
diagnositic information of the application in case of errors

setDiagnostics

@InterfaceAudience.Private
@InterfaceStability.Unstable
public abstract void setDiagnostics(String diagnostics)

getTrackingUrl

@InterfaceAudience.Public
@InterfaceStability.Stable
public abstract String getTrackingUrl()
Get the tracking url for the application.

Returns:
tracking url for the application

setTrackingUrl

@InterfaceAudience.Private
@InterfaceStability.Unstable
public abstract void setTrackingUrl(String url)

getOriginalTrackingUrl

@InterfaceAudience.Private
@InterfaceStability.Unstable
public abstract String getOriginalTrackingUrl()
Get the original not-proxied tracking url for the application. This is intended to only be used by the proxy itself.

Returns:
the original not-proxied tracking url for the application

setOriginalTrackingUrl

@InterfaceAudience.Private
@InterfaceStability.Unstable
public abstract void setOriginalTrackingUrl(String url)

getStartTime

@InterfaceAudience.Public
@InterfaceStability.Stable
public abstract long getStartTime()
Get the start time of the application.

Returns:
start time of the application

setStartTime

@InterfaceAudience.Private
@InterfaceStability.Unstable
public abstract void setStartTime(long startTime)

getFinishTime

@InterfaceAudience.Public
@InterfaceStability.Stable
public abstract long getFinishTime()
Get the finish time of the application.

Returns:
finish time of the application

setFinishTime

@InterfaceAudience.Private
@InterfaceStability.Unstable
public abstract void setFinishTime(long finishTime)

getFinalApplicationStatus

@InterfaceAudience.Public
@InterfaceStability.Stable
public abstract FinalApplicationStatus getFinalApplicationStatus()
Get the final finish status of the application.

Returns:
final finish status of the application

setFinalApplicationStatus

@InterfaceAudience.Private
@InterfaceStability.Unstable
public abstract void setFinalApplicationStatus(FinalApplicationStatus finishState)

getApplicationResourceUsageReport

@InterfaceAudience.Public
@InterfaceStability.Stable
public abstract ApplicationResourceUsageReport getApplicationResourceUsageReport()
Retrieve the structure containing the job resources for this application

Returns:
the job resources structure for this application

setApplicationResourceUsageReport

@InterfaceAudience.Private
@InterfaceStability.Unstable
public abstract void setApplicationResourceUsageReport(ApplicationResourceUsageReport appResources)
Store the structure containing the job resources for this application

Parameters:
appResources - structure for this application

getProgress

@InterfaceAudience.Public
@InterfaceStability.Stable
public abstract float getProgress()
Get the application's progress ( range 0.0 to 1.0 )

Returns:
application's progress

setProgress

@InterfaceAudience.Private
@InterfaceStability.Unstable
public abstract void setProgress(float progress)

getApplicationType

@InterfaceAudience.Public
@InterfaceStability.Stable
public abstract String getApplicationType()
Get the application's Type

Returns:
application's Type

setApplicationType

@InterfaceAudience.Private
@InterfaceStability.Unstable
public abstract void setApplicationType(String applicationType)

setAMRMToken

@InterfaceAudience.Private
@InterfaceStability.Stable
public abstract void setAMRMToken(Token amRmToken)

getAMRMToken

@InterfaceAudience.Public
@InterfaceStability.Stable
public abstract Token getAMRMToken()
Get the AMRM token of the application.

The AMRM token is required for AM to RM scheduling operations. For managed Application Masters Yarn takes care of injecting it. For unmanaged Applications Masters, the token must be obtained via this method and set in the UserGroupInformation of the current user.

The AMRM token will be returned only if all the following conditions are met:

    • the requester is the owner of the ApplicationMaster
      the application master is an unmanaged ApplicationMaster
      the application master is in ACCEPTED state
  • Else this method returns NULL.

    Returns:
    the AM to RM token if available.


    Copyright © 2014 Apache Software Foundation. All Rights Reserved.