diff --git a/hadoop-yarn-project/hadoop-yarn/hadoop-yarn-server/hadoop-yarn-server-web-proxy/src/main/java/org/apache/hadoop/yarn/server/webproxy/amfilter/AmFilterInitializer.java b/hadoop-yarn-project/hadoop-yarn/hadoop-yarn-server/hadoop-yarn-server-web-proxy/src/main/java/org/apache/hadoop/yarn/server/webproxy/amfilter/AmFilterInitializer.java index c3ddc54f3e2..27742e41a29 100644 --- a/hadoop-yarn-project/hadoop-yarn/hadoop-yarn-server/hadoop-yarn-server-web-proxy/src/main/java/org/apache/hadoop/yarn/server/webproxy/amfilter/AmFilterInitializer.java +++ b/hadoop-yarn-project/hadoop-yarn/hadoop-yarn-server/hadoop-yarn-server-web-proxy/src/main/java/org/apache/hadoop/yarn/server/webproxy/amfilter/AmFilterInitializer.java @@ -59,7 +59,6 @@ public class AmFilterInitializer extends FilterInitializer { } sb.setLength(sb.length() - 1); params.put(AmIpFilter.PROXY_URI_BASES, sb.toString()); - container.addFilter(FILTER_NAME, FILTER_CLASS, params); // Handle RM HA urls // Include yarn-site.xml in the classpath @@ -75,6 +74,8 @@ public class AmFilterInitializer extends FilterInitializer { params.put(RM_HA_URLS, StringUtils.join(",", urls)); } } + + container.addFilter(FILTER_NAME, FILTER_CLASS, params); } private Collection getRmIds(Configuration conf) {