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/trunk@1584954 13f79535-47bb-0310-9956-ffa450edef68
This commit is contained in:
parent
4e979f5dea
commit
05da90ee2f
@ -270,8 +270,14 @@ public void testRMWebAppRedirect() throws YarnException,
|
||||
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 void testRMWebAppRedirect() throws YarnException,
|
||||
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);
|
||||
|
||||
|
@ -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) {
|
||||
|
Loading…
Reference in New Issue
Block a user