Selaa lähdekoodia

merge -r 1358202:1358203 from branch-2. FIXES: MAPREDUCE-4387

git-svn-id: https://svn.apache.org/repos/asf/hadoop/common/branches/branch-0.23@1358205 13f79535-47bb-0310-9956-ffa450edef68
Thomas Graves 13 vuotta sitten
vanhempi
commit
69f7452de6

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

@@ -278,6 +278,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

@@ -321,6 +321,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) {