hadoop-common-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From s..@apache.org
Subject svn commit: r712331 - in /hadoop/core/branches/branch-0.18: CHANGES.txt src/hdfs/org/apache/hadoop/dfs/FSNamesystem.java src/hdfs/org/apache/hadoop/dfs/UpgradeManagerNamenode.java
Date Sat, 08 Nov 2008 01:11:59 GMT
Author: shv
Date: Fri Nov  7 17:11:59 2008
New Revision: 712331

URL: http://svn.apache.org/viewvc?rev=712331&view=rev
Log:
HADOOP-4610. Merge -r 712246:712247 from trunk to branch 0.18.

Modified:
    hadoop/core/branches/branch-0.18/CHANGES.txt
    hadoop/core/branches/branch-0.18/src/hdfs/org/apache/hadoop/dfs/FSNamesystem.java
    hadoop/core/branches/branch-0.18/src/hdfs/org/apache/hadoop/dfs/UpgradeManagerNamenode.java

Modified: hadoop/core/branches/branch-0.18/CHANGES.txt
URL: http://svn.apache.org/viewvc/hadoop/core/branches/branch-0.18/CHANGES.txt?rev=712331&r1=712330&r2=712331&view=diff
==============================================================================
--- hadoop/core/branches/branch-0.18/CHANGES.txt (original)
+++ hadoop/core/branches/branch-0.18/CHANGES.txt Fri Nov  7 17:11:59 2008
@@ -12,6 +12,9 @@
     HADOOP-3121. lsr should keep listing the remaining items but not
     terminate if there is any IOException. (szetszwo)
 
+    HADOOP-4610. Always calculate mis-replicated blocks when safe-mode is 
+    turned off. (shv)
+
 Release 0.18.2 - 2008-11-03
 
   BUG FIXES

Modified: hadoop/core/branches/branch-0.18/src/hdfs/org/apache/hadoop/dfs/FSNamesystem.java
URL: http://svn.apache.org/viewvc/hadoop/core/branches/branch-0.18/src/hdfs/org/apache/hadoop/dfs/FSNamesystem.java?rev=712331&r1=712330&r2=712331&view=diff
==============================================================================
--- hadoop/core/branches/branch-0.18/src/hdfs/org/apache/hadoop/dfs/FSNamesystem.java (original)
+++ hadoop/core/branches/branch-0.18/src/hdfs/org/apache/hadoop/dfs/FSNamesystem.java Fri
Nov  7 17:11:59 2008
@@ -3788,8 +3788,7 @@
      * Switch to manual safe mode if distributed upgrade is required.<br>
      * Check for invalid, under- & over-replicated blocks in the end of startup.
      */
-    synchronized void leave(boolean checkForUpgrades,
-                            boolean checkBlockReplication) {
+    synchronized void leave(boolean checkForUpgrades) {
       if(checkForUpgrades) {
         // verify whether a distributed upgrade needs to be started
         boolean needUpgrade = false;
@@ -3804,9 +3803,8 @@
           return;
         }
       }
-      if(checkBlockReplication)
-        // verify blocks replications
-        processMisReplicatedBlocks();
+      // verify blocks replications
+      processMisReplicatedBlocks();
       long timeInSafemode = now() - systemStart;
       NameNode.stateChangeLog.info("STATE* Leaving safe mode after " 
                                     + timeInSafemode/1000 + " secs.");
@@ -3868,7 +3866,7 @@
       // the threshold is reached
       if (!isOn() ||                           // safe mode is off
           extension <= 0 || threshold <= 0) {  // don't need to wait
-        this.leave(true, false); // leave safe mode
+        this.leave(true); // leave safe mode
         return;
       }
       if (reached > 0) {  // threshold has already been reached before
@@ -4006,7 +4004,7 @@
       }
       // leave safe mode and stop the monitor
       if(safeMode != null)
-        safeMode.leave(true, true);
+        safeMode.leave(true);
       smmthread = null;
     }
   }
@@ -4024,7 +4022,7 @@
       checkSuperuserPrivilege();
       switch(action) {
       case SAFEMODE_LEAVE: // leave safe mode
-        leaveSafeMode(false, true);
+        leaveSafeMode(false);
         break;
       case SAFEMODE_ENTER: // enter safe mode
         enterSafeMode();
@@ -4095,9 +4093,7 @@
    * Leave safe mode.
    * @throws IOException
    */
-  synchronized void leaveSafeMode(boolean checkForUpgrades,
-                                  boolean checkBlockReplication
-                                 ) throws IOException {
+  synchronized void leaveSafeMode(boolean checkForUpgrades) throws IOException {
     if (!isInSafeMode()) {
       NameNode.stateChangeLog.info("STATE* Safe mode is already OFF."); 
       return;
@@ -4105,7 +4101,7 @@
     if(getDistributedUpgradeState())
       throw new SafeModeException("Distributed upgrade is in progress",
                                   safeMode);
-    safeMode.leave(checkForUpgrades, checkBlockReplication);
+    safeMode.leave(checkForUpgrades);
   }
     
   String getSafeModeTip() {

Modified: hadoop/core/branches/branch-0.18/src/hdfs/org/apache/hadoop/dfs/UpgradeManagerNamenode.java
URL: http://svn.apache.org/viewvc/hadoop/core/branches/branch-0.18/src/hdfs/org/apache/hadoop/dfs/UpgradeManagerNamenode.java?rev=712331&r1=712330&r2=712331&view=diff
==============================================================================
--- hadoop/core/branches/branch-0.18/src/hdfs/org/apache/hadoop/dfs/UpgradeManagerNamenode.java
(original)
+++ hadoop/core/branches/branch-0.18/src/hdfs/org/apache/hadoop/dfs/UpgradeManagerNamenode.java
Fri Nov  7 17:11:59 2008
@@ -101,7 +101,7 @@
     FSNamesystem.getFSNamesystem().getFSImage().writeAll();
     currentUpgrades = null;
     broadcastCommand = null;
-    FSNamesystem.getFSNamesystem().leaveSafeMode(false, true);
+    FSNamesystem.getFSNamesystem().leaveSafeMode(false);
   }
 
   UpgradeStatusReport distributedUpgradeProgress(UpgradeAction action 



Mime
View raw message