Class AppReportFetcher
java.lang.Object
org.apache.hadoop.yarn.server.webproxy.AppReportFetcher
- Direct Known Subclasses:
DefaultAppReportFetcher,FedAppReportFetcher
This class abstracts away how ApplicationReports are fetched.
-
Nested Class Summary
Nested ClassesModifier and TypeClassDescriptionprotected static enumprotected static class -
Constructor Summary
ConstructorsConstructorDescriptionAppReportFetcher(org.apache.hadoop.conf.Configuration conf) Create a new Connection to the RM/Application History Server to fetch Application reports. -
Method Summary
Modifier and TypeMethodDescriptionprotected org.apache.hadoop.yarn.api.ApplicationHistoryProtocolgetAHSProxy(org.apache.hadoop.conf.Configuration configuration) protected AppReportFetcher.FetchedAppReportgetApplicationReport(org.apache.hadoop.yarn.api.ApplicationClientProtocol applicationsManager, org.apache.hadoop.yarn.api.records.ApplicationId appId) 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.abstract AppReportFetcher.FetchedAppReportgetApplicationReport(org.apache.hadoop.yarn.api.records.ApplicationId appId) 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.protected org.apache.hadoop.conf.ConfigurationgetConf()abstract StringgetRmAppPageUrlBase(org.apache.hadoop.yarn.api.records.ApplicationId appId) voidsetHistoryManager(org.apache.hadoop.yarn.api.ApplicationHistoryProtocol historyManager) voidstop()
-
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:
IOExceptionorg.apache.hadoop.yarn.exceptions.YarnException
-
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)
-