Browse Source

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

Jason Lowe 9 years ago
parent
commit
4163e36c2b

+ 1 - 1
hadoop-yarn-project/hadoop-yarn/hadoop-yarn-server/hadoop-yarn-server-web-proxy/src/main/java/org/apache/hadoop/yarn/server/webproxy/WebAppProxyServlet.java

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

+ 1 - 1
hadoop-yarn-project/hadoop-yarn/hadoop-yarn-server/hadoop-yarn-server-web-proxy/src/test/java/org/apache/hadoop/yarn/server/webproxy/TestWebAppProxyServlet.java

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