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 c3ddc54f3e..27742e41a2 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 void initFilter(FilterContainer container, Configuration conf) { } 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 void initFilter(FilterContainer container, Configuration conf) { params.put(RM_HA_URLS, StringUtils.join(",", urls)); } } + + container.addFilter(FILTER_NAME, FILTER_CLASS, params); } private Collection getRmIds(Configuration conf) {