Merge -c 1584954 from trunk to branch-2 to fix YARN-1898. Addendum patch to ensure /jmx and /metrics are re-directed to Active RM.

git-svn-id: https://svn.apache.org/repos/asf/hadoop/common/branches/branch-2@1584955 13f79535-47bb-0310-9956-ffa450edef68
This commit is contained in:
Arun Murthy 2014-04-05 02:52:35 +00:00
parent a558f63105
commit 243bb224a2
2 changed files with 9 additions and 9 deletions

View File

@ -270,8 +270,14 @@ public class TestRMFailover extends ClientBaseWithFixes {
String header = getHeader("Refresh", rm2Url);
assertTrue(header.contains("; url=" + rm1Url));
// standby RM links /conf, /stacks, /logLevel, /metrics, /jmx,
// /static, /logs, /cluster/cluster as well as webService
header = getHeader("Refresh", rm2Url + "/metrics");
assertTrue(header.contains("; url=" + rm1Url));
header = getHeader("Refresh", rm2Url + "/jmx");
assertTrue(header.contains("; url=" + rm1Url));
// standby RM links /conf, /stacks, /logLevel, /static, /logs,
// /cluster/cluster as well as webService
// /ws/v1/cluster/info should not be redirected to active RM
header = getHeader("Refresh", rm2Url + "/cluster/cluster");
assertEquals(null, header);
@ -285,12 +291,6 @@ public class TestRMFailover extends ClientBaseWithFixes {
header = getHeader("Refresh", rm2Url + "/logLevel");
assertEquals(null, header);
header = getHeader("Refresh", rm2Url + "/metrics");
assertEquals(null, header);
header = getHeader("Refresh", rm2Url + "/jmx");
assertEquals(null, header);
header = getHeader("Refresh", rm2Url + "/static");
assertEquals(null, header);

View File

@ -46,7 +46,7 @@ public class RMWebAppFilter extends GuiceContainer {
// define a set of URIs which do not need to do redirection
private static final Set<String> NON_REDIRECTED_URIS = Sets.newHashSet(
"/conf", "/stacks", "/logLevel", "/metrics", "/jmx", "/logs");
"/conf", "/stacks", "/logLevel", "/logs");
@Inject
public RMWebAppFilter(Injector injector) {