Browse Source

svn merge -c 1295147 trunk to branch 23 FIXES 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/branches/branch-0.23@1295149 13f79535-47bb-0310-9956-ffa450edef68
Robert Joseph Evans 13 years ago
parent
commit
cb6f468ddf

+ 4 - 0
hadoop-mapreduce-project/CHANGES.txt

@@ -134,6 +134,10 @@ Release 0.23.2 - UNRELEASED
     so that race conditions don't fail tasks by inadvertantly changing the
     so that race conditions don't fail tasks by inadvertantly changing the
     timestamps. (Siddarth Seth via vinodkv)
     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
 Release 0.23.1 - 2012-02-17
 
 
   NEW FEATURES
   NEW FEATURES

+ 5 - 1
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(
       URI trackingUri = ProxyUriUtils.getUriFromAMUrl(
           applicationReport.getOriginalTrackingUrl());
           applicationReport.getOriginalTrackingUrl());
-      
+      if(applicationReport.getOriginalTrackingUrl().equals("N/A")) {
+        notFound(resp, "The MRAppMaster died before writing anything.");
+        return;
+      }
+
       String runningUser = applicationReport.getUser();
       String runningUser = applicationReport.getUser();
       if(checkUser && !runningUser.equals(remoteUser)) {
       if(checkUser && !runningUser.equals(remoteUser)) {
         LOG.info("Asking "+remoteUser+" if they want to connect to the " +
         LOG.info("Asking "+remoteUser+" if they want to connect to the " +