From 63b2019ab4de9db375baacccaf6b4bcf3074d14c Mon Sep 17 00:00:00 2001 From: Jason Lowe Date: Mon, 7 Mar 2016 15:59:45 +0000 Subject: [PATCH] YARN-4760. proxy redirect to history server uses wrong URL. Contributed by Eric Badger (cherry picked from commit 4163e36c2be2f562545aba93c1d47643a9ff4741) --- hadoop-yarn-project/CHANGES.txt | 3 +++ .../apache/hadoop/yarn/server/webproxy/WebAppProxyServlet.java | 2 +- .../hadoop/yarn/server/webproxy/TestWebAppProxyServlet.java | 2 +- 3 files changed, 5 insertions(+), 2 deletions(-) diff --git a/hadoop-yarn-project/CHANGES.txt b/hadoop-yarn-project/CHANGES.txt index ede98efd31a..f001675be1f 100644 --- a/hadoop-yarn-project/CHANGES.txt +++ b/hadoop-yarn-project/CHANGES.txt @@ -104,6 +104,9 @@ Release 2.7.3 - UNRELEASED YARN-4723. NodesListManager$UnknownNodeId ClassCastException (Kuhu Shukla via jlowe) + YARN-4760. proxy redirect to history server uses wrong URL (Eric Badger + via jlowe) + Release 2.7.2 - 2016-01-25 INCOMPATIBLE CHANGES diff --git a/hadoop-yarn-project/hadoop-yarn/hadoop-yarn-server/hadoop-yarn-server-web-proxy/src/main/java/org/apache/hadoop/yarn/server/webproxy/WebAppProxyServlet.java b/hadoop-yarn-project/hadoop-yarn/hadoop-yarn-server/hadoop-yarn-server-web-proxy/src/main/java/org/apache/hadoop/yarn/server/webproxy/WebAppProxyServlet.java index 7f89b929e19..92962512c1b 100644 --- a/hadoop-yarn-project/hadoop-yarn/hadoop-yarn-server/hadoop-yarn-server-web-proxy/src/main/java/org/apache/hadoop/yarn/server/webproxy/WebAppProxyServlet.java +++ b/hadoop-yarn-project/hadoop-yarn/hadoop-yarn-server/hadoop-yarn-server-web-proxy/src/main/java/org/apache/hadoop/yarn/server/webproxy/WebAppProxyServlet.java @@ -112,7 +112,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"); } /** diff --git a/hadoop-yarn-project/hadoop-yarn/hadoop-yarn-server/hadoop-yarn-server-web-proxy/src/test/java/org/apache/hadoop/yarn/server/webproxy/TestWebAppProxyServlet.java b/hadoop-yarn-project/hadoop-yarn/hadoop-yarn-server/hadoop-yarn-server-web-proxy/src/test/java/org/apache/hadoop/yarn/server/webproxy/TestWebAppProxyServlet.java index bccd6f90527..a6d83c8a0a7 100644 --- a/hadoop-yarn-project/hadoop-yarn/hadoop-yarn-server/hadoop-yarn-server-web-proxy/src/test/java/org/apache/hadoop/yarn/server/webproxy/TestWebAppProxyServlet.java +++ b/hadoop-yarn-project/hadoop-yarn/hadoop-yarn-server/hadoop-yarn-server-web-proxy/src/test/java/org/apache/hadoop/yarn/server/webproxy/TestWebAppProxyServlet.java @@ -249,7 +249,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)); }