瀏覽代碼

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
Robert Joseph Evans 13 年之前
父節點
當前提交
defa1c5bab

+ 4 - 0
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
     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
 
 
   INCOMPATIBLE CHANGES
   INCOMPATIBLE CHANGES

+ 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 " +