Class ApplicationReport

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

@Public @Stable public abstract class ApplicationReport extends Object
ApplicationReport is a report of an application.

It includes details such as:

  • ApplicationId of the application.
  • Applications user.
  • Application queue.
  • Application name.
  • Host on which the ApplicationMaster is running.
  • RPC port of the ApplicationMaster.
  • Tracking URL.
  • YarnApplicationState of the application.
  • Diagnostic information in case of errors.
  • Start time of the application.
  • Client Token of the application (if security is enabled).
See Also:
  • ApplicationBaseProtocol.getApplicationReport(org.apache.hadoop.yarn.api.protocolrecords.GetApplicationReportRequest)
  • Constructor Details

    • ApplicationReport

      public ApplicationReport()
  • Method Details

    • newInstance

      @Private @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 launchTime, long finishTime, FinalApplicationStatus finalStatus, ApplicationResourceUsageReport appResources, String origTrackingUrl, float progress, String applicationType, Token amRmToken)
    • newInstance

      @Private @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 submitTime, long launchTime, long finishTime, FinalApplicationStatus finalStatus, ApplicationResourceUsageReport appResources, String origTrackingUrl, float progress, String applicationType, Token amRmToken)
    • newInstance

      @Private @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, Set<String> tags, boolean unmanagedApplication, Priority priority, String appNodeLabelExpression, String amNodeLabelExpression)
    • newInstance

      @Private @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 launchTime, long finishTime, FinalApplicationStatus finalStatus, ApplicationResourceUsageReport appResources, String origTrackingUrl, float progress, String applicationType, Token amRmToken, Set<String> tags, boolean unmanagedApplication, Priority priority, String appNodeLabelExpression, String amNodeLabelExpression)
    • newInstance

      @Private @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 submitTime, long launchTime, long finishTime, FinalApplicationStatus finalStatus, ApplicationResourceUsageReport appResources, String origTrackingUrl, float progress, String applicationType, Token amRmToken, Set<String> tags, boolean unmanagedApplication, Priority priority, String appNodeLabelExpression, String amNodeLabelExpression)
    • getApplicationId

      @Public @Stable public abstract ApplicationId getApplicationId()
      Get the ApplicationId of the application.
      Returns:
      ApplicationId of the application
    • setApplicationId

      @Private @Unstable public abstract void setApplicationId(ApplicationId applicationId)
    • getCurrentApplicationAttemptId

      @Public @Stable public abstract ApplicationAttemptId getCurrentApplicationAttemptId()
      Get the ApplicationAttemptId of the current attempt of the application
      Returns:
      ApplicationAttemptId of the attempt
    • setCurrentApplicationAttemptId

      @Private @Unstable public abstract void setCurrentApplicationAttemptId(ApplicationAttemptId applicationAttemptId)
    • getUser

      @Public @Stable public abstract String getUser()
      Get the user who submitted the application.
      Returns:
      user who submitted the application
    • setUser

      @Private @Unstable public abstract void setUser(String user)
    • getQueue

      @Public @Stable public abstract String getQueue()
      Get the queue to which the application was submitted.
      Returns:
      queue to which the application was submitted
    • setQueue

      @Private @Unstable public abstract void setQueue(String queue)
    • getName

      @Public @Stable public abstract String getName()
      Get the user-defined name of the application.
      Returns:
      name of the application
    • setName

      @Private @Unstable public abstract void setName(String name)
    • getHost

      @Public @Stable public abstract String getHost()
      Get the host on which the ApplicationMaster is running.
      Returns:
      host on which the ApplicationMaster is running
    • setHost

      @Private @Unstable public abstract void setHost(String host)
    • getRpcPort

      @Public @Stable public abstract int getRpcPort()
      Get the RPC port of the ApplicationMaster.
      Returns:
      RPC port of the ApplicationMaster
    • setRpcPort

      @Private @Unstable public abstract void setRpcPort(int rpcPort)
    • getClientToAMToken

      @Public @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

      @Private @Unstable public abstract void setClientToAMToken(Token clientToAMToken)
    • getYarnApplicationState

      @Public @Stable public abstract YarnApplicationState getYarnApplicationState()
      Get the YarnApplicationState of the application.
      Returns:
      YarnApplicationState of the application
    • setYarnApplicationState

      @Private @Unstable public abstract void setYarnApplicationState(YarnApplicationState state)
    • getDiagnostics

      @Public @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

      @Private @Unstable public abstract void setDiagnostics(String diagnostics)
    • getTrackingUrl

      @Public @Stable public abstract String getTrackingUrl()
      Get the tracking url for the application.
      Returns:
      tracking url for the application
    • setTrackingUrl

      @Private @Unstable public abstract void setTrackingUrl(String url)
    • getOriginalTrackingUrl

      @Private @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

      @Private @Unstable public abstract void setOriginalTrackingUrl(String url)
    • getStartTime

      @Public @Stable public abstract long getStartTime()
      Get the start time of the application.
      Returns:
      start time of the application
    • setStartTime

      @Private @Unstable public abstract void setStartTime(long startTime)
    • getSubmitTime

      @Public @Stable public abstract long getSubmitTime()
    • setSubmitTime

      @Private @Unstable public abstract void setSubmitTime(long submitTime)
    • setLaunchTime

      @Private @Unstable public abstract void setLaunchTime(long setLaunchTime)
    • getLaunchTime

      @Public @Unstable public abstract long getLaunchTime()
    • getFinishTime

      @Public @Stable public abstract long getFinishTime()
      Get the finish time of the application.
      Returns:
      finish time of the application
    • setFinishTime

      @Private @Unstable public abstract void setFinishTime(long finishTime)
    • getFinalApplicationStatus

      @Public @Stable public abstract FinalApplicationStatus getFinalApplicationStatus()
      Get the final finish status of the application.
      Returns:
      final finish status of the application
    • setFinalApplicationStatus

      @Private @Unstable public abstract void setFinalApplicationStatus(FinalApplicationStatus finishState)
    • getApplicationResourceUsageReport

      @Public @Stable public abstract ApplicationResourceUsageReport getApplicationResourceUsageReport()
      Retrieve the structure containing the job resources for this application
      Returns:
      the job resources structure for this application
    • setApplicationResourceUsageReport

      @Private @Unstable public abstract void setApplicationResourceUsageReport(ApplicationResourceUsageReport appResources)
      Store the structure containing the job resources for this application
      Parameters:
      appResources - structure for this application
    • getProgress

      @Public @Stable public abstract float getProgress()
      Get the application's progress ( range 0.0 to 1.0 )
      Returns:
      application's progress
    • setProgress

      @Private @Unstable public abstract void setProgress(float progress)
    • getApplicationType

      @Public @Stable public abstract String getApplicationType()
      Get the application's Type
      Returns:
      application's Type
    • setApplicationType

      @Private @Unstable public abstract void setApplicationType(String applicationType)
    • getApplicationTags

      @Public @Stable public abstract Set<String> getApplicationTags()
      Get all tags corresponding to the application
      Returns:
      Application's tags
    • setApplicationTags

      @Private @Unstable public abstract void setApplicationTags(Set<String> tags)
    • setAMRMToken

      @Private @Stable public abstract void setAMRMToken(Token amRmToken)
    • getAMRMToken

      @Public @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.
    • getLogAggregationStatus

      @Public @Stable public abstract LogAggregationStatus getLogAggregationStatus()
      Get log aggregation status for the application
      Returns:
      Application's log aggregation status
    • setLogAggregationStatus

      @Private @Unstable public abstract void setLogAggregationStatus(LogAggregationStatus logAggregationStatus)
    • isUnmanagedApp

      @Public @Unstable public abstract boolean isUnmanagedApp()
      Returns:
      true if the AM is not managed by the RM
    • setUnmanagedApp

      @Public @Unstable public abstract void setUnmanagedApp(boolean unmanagedApplication)
      Parameters:
      unmanagedApplication - true if RM should not manage the AM
    • getPriority

      @Public @Stable public abstract Priority getPriority()
      Get priority of the application
      Returns:
      Application's priority
    • setPriority

      @Private @Unstable public abstract void setPriority(Priority priority)
    • getAppNodeLabelExpression

      @Unstable public abstract String getAppNodeLabelExpression()
      Get the default Node Label expression for all the application's containers
      Returns:
      Application's NodeLabelExpression
    • setAppNodeLabelExpression

      @Unstable public abstract void setAppNodeLabelExpression(String appNodeLabelExpression)
    • getAmNodeLabelExpression

      @Unstable public abstract String getAmNodeLabelExpression()
      Get the default Node Label expression for all the application's containers
      Returns:
      Application's NodeLabelExpression
    • setAmNodeLabelExpression

      @Unstable public abstract void setAmNodeLabelExpression(String amNodeLabelExpression)
    • getApplicationTimeouts

      @Public @Unstable public abstract Map<ApplicationTimeoutType,ApplicationTimeout> getApplicationTimeouts()
    • setApplicationTimeouts

      @Private @Unstable public abstract void setApplicationTimeouts(Map<ApplicationTimeoutType,ApplicationTimeout> timeouts)
    • getRMClusterId

      @Public @Stable public abstract String getRMClusterId()
      Get RM ClusterId.
      Returns:
      RM ClusterId
    • setRMClusterId

      @Public @Stable public abstract void setRMClusterId(String rmClusterId)