Переглянути джерело

MAPREDUCE-4913. TestMRAppMaster#testMRAppMasterMissingStaging occasionally exits (Jason Lowe via tgraves)

git-svn-id: https://svn.apache.org/repos/asf/hadoop/common/branches/branch-0.23@1429377 13f79535-47bb-0310-9956-ffa450edef68
Thomas Graves 12 роки тому
батько
коміт
bdf2e47910

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

@@ -69,6 +69,9 @@ Release 0.23.6 - UNRELEASED
     MAPREDUCE-4819. AM can rerun job after reporting final job status to the
     MAPREDUCE-4819. AM can rerun job after reporting final job status to the
     client (bobby and Bikas Saha via bobby)
     client (bobby and Bikas Saha via bobby)
 
 
+    MAPREDUCE-4913. TestMRAppMaster#testMRAppMasterMissingStaging occasionally 
+    exits (Jason Lowe via tgraves)
+
 Release 0.23.5 - UNRELEASED
 Release 0.23.5 - UNRELEASED
 
 
   INCOMPATIBLE CHANGES
   INCOMPATIBLE CHANGES

+ 7 - 3
hadoop-mapreduce-project/hadoop-mapreduce-client/hadoop-mapreduce-client-app/src/main/java/org/apache/hadoop/mapreduce/v2/app/MRAppMaster.java

@@ -295,16 +295,20 @@ public class MRAppMaster extends CompositeService {
       dispatcher = createDispatcher();
       dispatcher = createDispatcher();
       addIfService(dispatcher);
       addIfService(dispatcher);
       
       
+      NoopEventHandler eater = new NoopEventHandler();
+      //We do not have a JobEventDispatcher in this path
+      dispatcher.register(JobEventType.class, eater);
+
       EventHandler<JobHistoryEvent> historyService = null;
       EventHandler<JobHistoryEvent> historyService = null;
       if (copyHistory) {
       if (copyHistory) {
         historyService = 
         historyService = 
           createJobHistoryHandler(context);
           createJobHistoryHandler(context);
         dispatcher.register(org.apache.hadoop.mapreduce.jobhistory.EventType.class,
         dispatcher.register(org.apache.hadoop.mapreduce.jobhistory.EventType.class,
             historyService);
             historyService);
+      } else {
+        dispatcher.register(org.apache.hadoop.mapreduce.jobhistory.EventType.class,
+            eater);
       }
       }
-      NoopEventHandler eater = new NoopEventHandler();
-      //We do not have a JobEventDispatcher in this path
-      dispatcher.register(JobEventType.class, eater);
       
       
       // service to allocate containers from RM (if non-uber) or to fake it (uber)
       // service to allocate containers from RM (if non-uber) or to fake it (uber)
       containerAllocator = createContainerAllocator(null, context);
       containerAllocator = createContainerAllocator(null, context);