Class DefaultAppReportFetcher

java.lang.Object
org.apache.hadoop.yarn.server.webproxy.AppReportFetcher
org.apache.hadoop.yarn.server.webproxy.DefaultAppReportFetcher

public class DefaultAppReportFetcher extends AppReportFetcher
  • Constructor Details

    • DefaultAppReportFetcher

      public DefaultAppReportFetcher(org.apache.hadoop.conf.Configuration conf)
      Create a new Connection to the RM/Application History Server to fetch Application reports.
      Parameters:
      conf - the conf to use to know where the RM is.
    • DefaultAppReportFetcher

      public DefaultAppReportFetcher(org.apache.hadoop.conf.Configuration conf, org.apache.hadoop.yarn.api.ApplicationClientProtocol applicationsManager)
      Create a direct connection to RM instead of a remote connection when the proxy is running as part of the RM. Also create a remote connection to Application History Server if it is enabled.
      Parameters:
      conf - the configuration to use
      applicationsManager - what to use to get the RM reports.
  • Method Details

    • getApplicationReport

      public AppReportFetcher.FetchedAppReport getApplicationReport(org.apache.hadoop.yarn.api.records.ApplicationId appId) throws org.apache.hadoop.yarn.exceptions.YarnException, IOException
      Get an application report for the specified application id from the RM and fall back to the Application History Server if not found in RM.
      Specified by:
      getApplicationReport in class AppReportFetcher
      Parameters:
      appId - id of the application to get.
      Returns:
      the ApplicationReport for the appId.
      Throws:
      org.apache.hadoop.yarn.exceptions.YarnException - on any error.
      IOException - connection exception.
    • getRmAppPageUrlBase

      public String getRmAppPageUrlBase(org.apache.hadoop.yarn.api.records.ApplicationId appId) throws org.apache.hadoop.yarn.exceptions.YarnException, IOException
      Specified by:
      getRmAppPageUrlBase in class AppReportFetcher
      Throws:
      org.apache.hadoop.yarn.exceptions.YarnException
      IOException
    • stop

      public void stop()
      Overrides:
      stop in class AppReportFetcher