diff --git a/hadoop-yarn-project/hadoop-yarn/hadoop-yarn-client/src/test/java/org/apache/hadoop/yarn/client/TestRMFailover.java b/hadoop-yarn-project/hadoop-yarn/hadoop-yarn-client/src/test/java/org/apache/hadoop/yarn/client/TestRMFailover.java index 6eae898734..d9f6d4e470 100644 --- a/hadoop-yarn-project/hadoop-yarn/hadoop-yarn-client/src/test/java/org/apache/hadoop/yarn/client/TestRMFailover.java +++ b/hadoop-yarn-project/hadoop-yarn/hadoop-yarn-client/src/test/java/org/apache/hadoop/yarn/client/TestRMFailover.java @@ -295,7 +295,7 @@ public void testRMWebAppRedirect() throws YarnException, assertEquals(redirectURL,rm1Url + "/metrics"); - // standby RM links /conf, /stacks, /logLevel, /static, /logs, /jmx + // standby RM links /conf, /stacks, /logLevel, /static, /logs, /jmx, /prom // /cluster/cluster as well as webService // /ws/v1/cluster/info should not be redirected to active RM redirectURL = getRedirectURL(rm2Url + "/cluster/cluster"); @@ -319,6 +319,9 @@ public void testRMWebAppRedirect() throws YarnException, redirectURL = getRedirectURL(rm2Url + "/jmx?param1=value1+x¶m2=y"); assertNull(redirectURL); + redirectURL = getRedirectURL(rm2Url + "/prom"); + assertNull(redirectURL); + redirectURL = getRedirectURL(rm2Url + "/ws/v1/cluster/info"); assertNull(redirectURL); diff --git a/hadoop-yarn-project/hadoop-yarn/hadoop-yarn-server/hadoop-yarn-server-resourcemanager/src/main/java/org/apache/hadoop/yarn/server/resourcemanager/webapp/RMWebAppFilter.java b/hadoop-yarn-project/hadoop-yarn/hadoop-yarn-server/hadoop-yarn-server-resourcemanager/src/main/java/org/apache/hadoop/yarn/server/resourcemanager/webapp/RMWebAppFilter.java index 4f9cfdc8d5..6870317f9a 100644 --- a/hadoop-yarn-project/hadoop-yarn/hadoop-yarn-server/hadoop-yarn-server-resourcemanager/src/main/java/org/apache/hadoop/yarn/server/resourcemanager/webapp/RMWebAppFilter.java +++ b/hadoop-yarn-project/hadoop-yarn/hadoop-yarn-server/hadoop-yarn-server-resourcemanager/src/main/java/org/apache/hadoop/yarn/server/resourcemanager/webapp/RMWebAppFilter.java @@ -70,7 +70,7 @@ public class RMWebAppFilter extends GuiceContainer { // define a set of URIs which do not need to do redirection private static final Set NON_REDIRECTED_URIS = Sets.newHashSet( "/conf", "/stacks", "/logLevel", "/logs", IsActiveServlet.PATH_SPEC, - "/jmx"); + "/jmx", "/prom"); private String path; private boolean ahsEnabled; private String ahsPageURLPrefix;