Author: bobby Date: Fri Jan 4 20:38:36 2013 New Revision: 1429115 URL: http://svn.apache.org/viewvc?rev=1429115&view=rev Log: svn merge -c 1429114 FIXES: MAPREDUCE-4819. AM can rerun job after reporting final job status to the client (bobby and Bikas Saha via bobby)
Modified: hadoop/common/branches/branch-2/hadoop-yarn-project/hadoop-yarn/hadoop-yarn-common/src/main/java/org/apache/hadoop/yarn/event/AsyncDispatcher.java hadoop/common/branches/branch-2/hadoop-yarn-project/hadoop-yarn/hadoop-yarn-server/hadoop-yarn-server-web-proxy/src/main/java/org/apache/hadoop/yarn/server/webproxy/WebAppProxyServlet.java Modified: hadoop/common/branches/branch-2/hadoop-yarn-project/hadoop-yarn/hadoop-yarn-common/src/main/java/org/apache/hadoop/yarn/event/AsyncDispatcher.java URL: http://svn.apache.org/viewvc/hadoop/common/branches/branch-2/hadoop-yarn-project/hadoop-yarn/hadoop-yarn-common/src/main/java/org/apache/hadoop/yarn/event/AsyncDispatcher.java?rev=1429115&r1=1429114&r2=1429115&view=diff ============================================================================== --- hadoop/common/branches/branch-2/hadoop-yarn-project/hadoop-yarn/hadoop-yarn-common/src/main/java/org/apache/hadoop/yarn/event/AsyncDispatcher.java (original) +++ hadoop/common/branches/branch-2/hadoop-yarn-project/hadoop-yarn/hadoop-yarn-common/src/main/java/org/apache/hadoop/yarn/event/AsyncDispatcher.java Fri Jan 4 20:38:36 2013 @@ -125,7 +125,12 @@ public class AsyncDispatcher extends Abs Class<? extends Enum> type = event.getType().getDeclaringClass(); try{ - eventDispatchers.get(type).handle(event); + EventHandler handler = eventDispatchers.get(type); + if(handler != null) { + handler.handle(event); + } else { + throw new Exception("No handler for registered for " + type); + } } catch (Throwable t) { //TODO Maybe log the state of the queue Modified: hadoop/common/branches/branch-2/hadoop-yarn-project/hadoop-yarn/hadoop-yarn-server/hadoop-yarn-server-web-proxy/src/main/java/org/apache/hadoop/yarn/server/webproxy/WebAppProxyServlet.java URL: http://svn.apache.org/viewvc/hadoop/common/branches/branch-2/hadoop-yarn-project/hadoop-yarn/hadoop-yarn-server/hadoop-yarn-server-web-proxy/src/main/java/org/apache/hadoop/yarn/server/webproxy/WebAppProxyServlet.java?rev=1429115&r1=1429114&r2=1429115&view=diff ============================================================================== --- hadoop/common/branches/branch-2/hadoop-yarn-project/hadoop-yarn/hadoop-yarn-server/hadoop-yarn-server-web-proxy/src/main/java/org/apache/hadoop/yarn/server/webproxy/WebAppProxyServlet.java (original) +++ hadoop/common/branches/branch-2/hadoop-yarn-project/hadoop-yarn/hadoop-yarn-server/hadoop-yarn-server-web-proxy/src/main/java/org/apache/hadoop/yarn/server/webproxy/WebAppProxyServlet.java Fri Jan 4 20:38:36 2013 @@ -286,9 +286,12 @@ public class WebAppProxyServlet extends "please try the history server"); return; } - URI trackingUri = ProxyUriUtils.getUriFromAMUrl( - applicationReport.getOriginalTrackingUrl()); - if(applicationReport.getOriginalTrackingUrl().equals("N/A")) { + String original = applicationReport.getOriginalTrackingUrl(); + URI trackingUri = null; + if (original != null) { + trackingUri = ProxyUriUtils.getUriFromAMUrl(original); + } + if(original == null || original.equals("N/A")) { String message; switch(applicationReport.getFinalApplicationStatus()) { case FAILED: