hadoop-common-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From cutt...@apache.org
Subject svn commit: r546276 - in /lucene/hadoop/trunk: CHANGES.txt src/java/org/apache/hadoop/dfs/FSNamesystem.java
Date Mon, 11 Jun 2007 20:52:59 GMT
Author: cutting
Date: Mon Jun 11 13:52:58 2007
New Revision: 546276

URL: http://svn.apache.org/viewvc?view=rev&rev=546276
Log:
Remove redundant events from HDFS namenode's edit log when a datanode restarts.  Contributed
by Raghu.

Modified:
    lucene/hadoop/trunk/CHANGES.txt
    lucene/hadoop/trunk/src/java/org/apache/hadoop/dfs/FSNamesystem.java

Modified: lucene/hadoop/trunk/CHANGES.txt
URL: http://svn.apache.org/viewvc/lucene/hadoop/trunk/CHANGES.txt?view=diff&rev=546276&r1=546275&r2=546276
==============================================================================
--- lucene/hadoop/trunk/CHANGES.txt (original)
+++ lucene/hadoop/trunk/CHANGES.txt Mon Jun 11 13:52:58 2007
@@ -90,6 +90,9 @@
  29. HADOOP-1412.  Fix "dodgy" bugs identified by FindBugs in fs and
      io packages.  (Hairong Kuang via cutting)
 
+ 30. HADOOP-1261.  Remove redundant events from HDFS namenode's edit
+     log when a datanode restarts.  (Raghu Angadi via cutting)
+
 
 Release 0.13.0 - 2007-06-08
 

Modified: lucene/hadoop/trunk/src/java/org/apache/hadoop/dfs/FSNamesystem.java
URL: http://svn.apache.org/viewvc/lucene/hadoop/trunk/src/java/org/apache/hadoop/dfs/FSNamesystem.java?view=diff&rev=546276&r1=546275&r2=546276
==============================================================================
--- lucene/hadoop/trunk/src/java/org/apache/hadoop/dfs/FSNamesystem.java (original)
+++ lucene/hadoop/trunk/src/java/org/apache/hadoop/dfs/FSNamesystem.java Mon Jun 11 13:52:58
2007
@@ -1482,15 +1482,17 @@
                                       "BLOCK* NameSystem.registerDatanode: "
                                       + "node " + nodeS.getName()
                                       + " is replaced by " + nodeReg.getName() + ".");
+        getEditLog().logRemoveDatanode(nodeS);
       }
-      getEditLog().logRemoveDatanode(nodeS);
       // update cluster map
       clusterMap.remove(nodeS);
       nodeS.updateRegInfo(nodeReg);
       nodeS.setNetworkLocation(networkLocation);
       clusterMap.add(nodeS);
       nodeS.setHostName(hostName);
-      getEditLog().logAddDatanode(nodeS);
+      if ( nodeS != nodeN ) {
+        getEditLog().logAddDatanode( nodeS );
+      }
         
       // also treat the registration message as a heartbeat
       synchronized(heartbeats) {



Mime
View raw message