hadoop-hdfs-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From dhr...@apache.org
Subject svn commit: r959874 - in /hadoop/hdfs/trunk: CHANGES.txt src/java/org/apache/hadoop/hdfs/server/namenode/FSNamesystem.java
Date Fri, 02 Jul 2010 06:38:28 GMT
Author: dhruba
Date: Fri Jul  2 06:38:28 2010
New Revision: 959874

URL: http://svn.apache.org/viewvc?rev=959874&view=rev
Log:
HDFS-1145. When NameNode is shutdown it does not try to exit
safemode anymore. (dhruba)


Modified:
    hadoop/hdfs/trunk/CHANGES.txt
    hadoop/hdfs/trunk/src/java/org/apache/hadoop/hdfs/server/namenode/FSNamesystem.java

Modified: hadoop/hdfs/trunk/CHANGES.txt
URL: http://svn.apache.org/viewvc/hadoop/hdfs/trunk/CHANGES.txt?rev=959874&r1=959873&r2=959874&view=diff
==============================================================================
--- hadoop/hdfs/trunk/CHANGES.txt (original)
+++ hadoop/hdfs/trunk/CHANGES.txt Fri Jul  2 06:38:28 2010
@@ -102,6 +102,9 @@ Trunk (unreleased changes)
     HDFS-1250. Namenode should reject block reports and block received
     requests from dead datanodes (suresh)
 
+    HDFS-1145. When NameNode is shutdown it does not try to exit
+    safemode anymore. (dhruba)
+
 Release 0.21.0 - Unreleased
 
   INCOMPATIBLE CHANGES

Modified: hadoop/hdfs/trunk/src/java/org/apache/hadoop/hdfs/server/namenode/FSNamesystem.java
URL: http://svn.apache.org/viewvc/hadoop/hdfs/trunk/src/java/org/apache/hadoop/hdfs/server/namenode/FSNamesystem.java?rev=959874&r1=959873&r2=959874&view=diff
==============================================================================
--- hadoop/hdfs/trunk/src/java/org/apache/hadoop/hdfs/server/namenode/FSNamesystem.java (original)
+++ hadoop/hdfs/trunk/src/java/org/apache/hadoop/hdfs/server/namenode/FSNamesystem.java Fri
Jul  2 06:38:28 2010
@@ -3746,13 +3746,17 @@ public class FSNamesystem implements FSC
         } catch (InterruptedException ie) {
         }
       }
-      // leave safe mode and stop the monitor
-      try {
-        leaveSafeMode(true);
-      } catch(SafeModeException es) { // should never happen
-        String msg = "SafeModeMonitor may not run during distributed upgrade.";
-        assert false : msg;
-        throw new RuntimeException(msg, es);
+      if (!fsRunning) {
+        LOG.info("NameNode is being shutdown, exit SafeModeMonitor thread. ");
+      } else {
+        // leave safe mode and stop the monitor
+        try {
+          leaveSafeMode(true);
+        } catch(SafeModeException es) { // should never happen
+          String msg = "SafeModeMonitor may not run during distributed upgrade.";
+          assert false : msg;
+          throw new RuntimeException(msg, es);
+        }
       }
       smmthread = null;
     }



Mime
View raw message