Class AppReportFetcher

java.lang.Object
org.apache.hadoop.yarn.server.webproxy.AppReportFetcher
Direct Known Subclasses:
DefaultAppReportFetcher, FedAppReportFetcher

public abstract class AppReportFetcher extends Object
This class abstracts away how ApplicationReports are fetched.
  • Constructor Details

    • AppReportFetcher

      public AppReportFetcher(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.
  • Method Details

    • getAHSProxy

      protected org.apache.hadoop.yarn.api.ApplicationHistoryProtocol getAHSProxy(org.apache.hadoop.conf.Configuration configuration) throws IOException
      Throws:
      IOException
    • getApplicationReport

      public abstract 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.
      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
    • getApplicationReport

      protected AppReportFetcher.FetchedAppReport getApplicationReport(org.apache.hadoop.yarn.api.ApplicationClientProtocol applicationsManager, 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.
      Parameters:
      applicationsManager - what to use to get the RM reports.
      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 abstract String getRmAppPageUrlBase(org.apache.hadoop.yarn.api.records.ApplicationId appId) throws IOException, org.apache.hadoop.yarn.exceptions.YarnException
      Throws:
      IOException
      org.apache.hadoop.yarn.exceptions.YarnException
    • getAhsAppPageUrlBase

      public String getAhsAppPageUrlBase()
    • getConf

      protected org.apache.hadoop.conf.Configuration getConf()
    • stop

      public void stop()
    • setHistoryManager

      @VisibleForTesting public void setHistoryManager(org.apache.hadoop.yarn.api.ApplicationHistoryProtocol historyManager)