slfan1989 commented on code in PR #4314:
URL: https://github.com/apache/hadoop/pull/4314#discussion_r928787228
##########
hadoop-yarn-project/hadoop-yarn/hadoop-yarn-server/hadoop-yarn-server-web-proxy/src/main/java/org/apache/hadoop/yarn/server/webproxy/AppReportFetcher.java:
##########
@@ -27,81 +29,54 @@
import org.apache.hadoop.yarn.api.records.ApplicationId;
import org.apache.hadoop.yarn.api.records.ApplicationReport;
import org.apache.hadoop.yarn.client.AHSProxy;
-import org.apache.hadoop.yarn.client.ClientRMProxy;
import org.apache.hadoop.yarn.conf.YarnConfiguration;
import org.apache.hadoop.yarn.exceptions.ApplicationNotFoundException;
import org.apache.hadoop.yarn.exceptions.YarnException;
import org.apache.hadoop.yarn.exceptions.YarnRuntimeException;
import org.apache.hadoop.yarn.factories.RecordFactory;
import org.apache.hadoop.yarn.factory.providers.RecordFactoryProvider;
+import org.apache.hadoop.yarn.util.StringHelper;
+import org.apache.hadoop.yarn.webapp.util.WebAppUtils;
/**
* This class abstracts away how ApplicationReports are fetched.
*/
-public class AppReportFetcher {
- enum AppReportSource { RM, AHS }
+public abstract class AppReportFetcher {
+
+ protected enum AppReportSource {RM, AHS}
+
private final Configuration conf;
- private final ApplicationClientProtocol applicationsManager;
- private final ApplicationHistoryProtocol historyManager;
+ private ApplicationHistoryProtocol historyManager;
+ private String ahsAppPageUrlBase;
private final RecordFactory recordFactory =
RecordFactoryProvider.getRecordFactory(null);
private boolean isAHSEnabled;
- /**
- * Create a new Connection to the RM/Application History Server
- * to fetch Application reports.
- * @param conf the conf to use to know where the RM is.
- */
public AppReportFetcher(Configuration conf) {
Review Comment:
Should we add the java doc?Why remove the comment?
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: [email protected]
For queries about this service, please contact Infrastructure at:
[email protected]
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]