YARN-4760. proxy redirect to history server uses wrong URL. Contributed by Eric Badger

(cherry picked from commit 4163e36c2b)
This commit is contained in:
Jason Lowe 2016-03-07 15:56:33 +00:00
parent 53ec7c9243
commit 0d734cea44
2 changed files with 2 additions and 2 deletions

View File

@ -130,7 +130,7 @@ public class WebAppProxyServlet extends HttpServlet {
WebAppUtils.getResolvedRMWebAppURLWithScheme(conf), "cluster", "app"); WebAppUtils.getResolvedRMWebAppURLWithScheme(conf), "cluster", "app");
this.ahsAppPageUrlBase = StringHelper.pjoin( this.ahsAppPageUrlBase = StringHelper.pjoin(
WebAppUtils.getHttpSchemePrefix(conf) + WebAppUtils WebAppUtils.getHttpSchemePrefix(conf) + WebAppUtils
.getAHSWebAppURLWithoutScheme(conf), "applicationhistory", "apps"); .getAHSWebAppURLWithoutScheme(conf), "applicationhistory", "app");
} }
/** /**

View File

@ -275,7 +275,7 @@ public class TestWebAppProxyServlet {
} }
String appAddressInAhs = WebAppUtils.getHttpSchemePrefix(configuration) + String appAddressInAhs = WebAppUtils.getHttpSchemePrefix(configuration) +
WebAppUtils.getAHSWebAppURLWithoutScheme(configuration) + WebAppUtils.getAHSWebAppURLWithoutScheme(configuration) +
"/applicationhistory" + "/apps/" + app.toString(); "/applicationhistory" + "/app/" + app.toString();
assertTrue("Webapp proxy servlet should have redirected to AHS", assertTrue("Webapp proxy servlet should have redirected to AHS",
proxyConn.getURL().toString().equals(appAddressInAhs)); proxyConn.getURL().toString().equals(appAddressInAhs));
} }