From defa1c5babdcb40eb2b868ee2564826a8fb68f3b Mon Sep 17 00:00:00 2001 From: Robert Joseph Evans Date: Wed, 29 Feb 2012 15:19:51 +0000 Subject: [PATCH] MAPREDUCE-3687. If AM dies before it returns new tracking URL, proxy redirects to http://N/A/ and doesn't return error code (Ravi Prakash via bobby) git-svn-id: https://svn.apache.org/repos/asf/hadoop/common/trunk@1295147 13f79535-47bb-0310-9956-ffa450edef68 --- hadoop-mapreduce-project/CHANGES.txt | 4 ++++ .../hadoop/yarn/server/webproxy/WebAppProxyServlet.java | 6 +++++- 2 files changed, 9 insertions(+), 1 deletion(-) diff --git a/hadoop-mapreduce-project/CHANGES.txt b/hadoop-mapreduce-project/CHANGES.txt index 8d965b5c59..58348b61e2 100644 --- a/hadoop-mapreduce-project/CHANGES.txt +++ b/hadoop-mapreduce-project/CHANGES.txt @@ -211,6 +211,10 @@ Release 0.23.2 - UNRELEASED so that race conditions don't fail tasks by inadvertantly changing the timestamps. (Siddarth Seth via vinodkv) + MAPREDUCE-3687. If AM dies before it returns new tracking URL, proxy + redirects to http://N/A/ and doesn't return error code (Ravi Prakash via + bobby) + Release 0.23.1 - 2012-02-17 INCOMPATIBLE CHANGES diff --git a/hadoop-mapreduce-project/hadoop-yarn/hadoop-yarn-server/hadoop-yarn-server-web-proxy/src/main/java/org/apache/hadoop/yarn/server/webproxy/WebAppProxyServlet.java b/hadoop-mapreduce-project/hadoop-yarn/hadoop-yarn-server/hadoop-yarn-server-web-proxy/src/main/java/org/apache/hadoop/yarn/server/webproxy/WebAppProxyServlet.java index b19977438d..3cca8bfb2c 100644 --- a/hadoop-mapreduce-project/hadoop-yarn/hadoop-yarn-server/hadoop-yarn-server-web-proxy/src/main/java/org/apache/hadoop/yarn/server/webproxy/WebAppProxyServlet.java +++ b/hadoop-mapreduce-project/hadoop-yarn/hadoop-yarn-server/hadoop-yarn-server-web-proxy/src/main/java/org/apache/hadoop/yarn/server/webproxy/WebAppProxyServlet.java @@ -237,7 +237,11 @@ public class WebAppProxyServlet extends HttpServlet { } URI trackingUri = ProxyUriUtils.getUriFromAMUrl( applicationReport.getOriginalTrackingUrl()); - + if(applicationReport.getOriginalTrackingUrl().equals("N/A")) { + notFound(resp, "The MRAppMaster died before writing anything."); + return; + } + String runningUser = applicationReport.getUser(); if(checkUser && !runningUser.equals(remoteUser)) { LOG.info("Asking "+remoteUser+" if they want to connect to the " +