p-szucs commented on code in PR #7813: URL: https://github.com/apache/hadoop/pull/7813#discussion_r2228192446
########## hadoop-yarn-project/hadoop-yarn/hadoop-yarn-common/src/main/java/org/apache/hadoop/yarn/webapp/util/WebAppUtils.java: ########## @@ -107,17 +107,29 @@ public static void setNMWebAppHostNameAndPort(Configuration conf, */ public static <T, R> R execOnActiveRM(Configuration conf, ThrowingBiFunction<String, T, R> func, T arg) throws Exception { - int haIndex = 0; + int activeRMIndex = 0; + int rmCount = 1; + if (HAUtil.isHAEnabled(conf)) { Review Comment: Thanks, I agree. Fixed ########## hadoop-yarn-project/hadoop-yarn/hadoop-yarn-common/src/main/java/org/apache/hadoop/yarn/webapp/util/WebAppUtils.java: ########## @@ -107,17 +107,29 @@ public static void setNMWebAppHostNameAndPort(Configuration conf, */ public static <T, R> R execOnActiveRM(Configuration conf, ThrowingBiFunction<String, T, R> func, T arg) throws Exception { - int haIndex = 0; + int activeRMIndex = 0; + int rmCount = 1; + if (HAUtil.isHAEnabled(conf)) { + ArrayList<String> rmIds = (ArrayList<String>) HAUtil.getRMHAIds(conf); Review Comment: Fixed -- 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: common-issues-unsubscr...@hadoop.apache.org For queries about this service, please contact Infrastructure at: us...@infra.apache.org --------------------------------------------------------------------- To unsubscribe, e-mail: common-issues-unsubscr...@hadoop.apache.org For additional commands, e-mail: common-issues-h...@hadoop.apache.org