Browse Source

MAPREDUCE-4387. RM gets fatal error and exits during TestRM (Kihwal Lee via tgraves)

git-svn-id: https://svn.apache.org/repos/asf/hadoop/common/trunk@1358201 13f79535-47bb-0310-9956-ffa450edef68
Thomas Graves 13 years ago
parent
commit
072292219e

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

@@ -640,6 +640,9 @@ Release 0.23.3 - UNRELEASED
 
     MAPREDUCE-4384. Race conditions in IndexCache (Kihwal Lee via tgraves)
 
+    MAPREDUCE-4387. RM gets fatal error and exits during TestRM 
+    (Kihwal Lee via tgraves)
+
 Release 0.23.2 - UNRELEASED
 
   INCOMPATIBLE CHANGES

+ 7 - 0
hadoop-mapreduce-project/hadoop-yarn/hadoop-yarn-server/hadoop-yarn-server-resourcemanager/src/main/java/org/apache/hadoop/yarn/server/resourcemanager/ResourceManager.java

@@ -324,6 +324,13 @@ public class ResourceManager extends CompositeService implements Recoverable {
           try {
             scheduler.handle(event);
           } catch (Throwable t) {
+            // An error occurred, but we are shutting down anyway.
+            // If it was an InterruptedException, the very act of 
+            // shutdown could have caused it and is probably harmless.
+            if (stopped) {
+              LOG.warn("Exception during shutdown: ", t);
+              break;
+            }
             LOG.fatal("Error in handling event type " + event.getType()
                 + " to the scheduler", t);
             if (shouldExitOnError