hadoop-common-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From tomwh...@apache.org
Subject svn commit: r517869 - in /lucene/hadoop/trunk: CHANGES.txt src/java/org/apache/hadoop/dfs/FSNamesystem.java src/java/org/apache/hadoop/net/NetworkTopology.java
Date Tue, 13 Mar 2007 21:04:11 GMT
Author: tomwhite
Date: Tue Mar 13 14:04:10 2007
New Revision: 517869

URL: http://svn.apache.org/viewvc?view=rev&rev=517869
Log:
HADOOP-1070.  Fix a problem with number of racks and datanodes temporarily doubling.  Contributed
by Konstantin Shvachko.

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

Modified: lucene/hadoop/trunk/CHANGES.txt
URL: http://svn.apache.org/viewvc/lucene/hadoop/trunk/CHANGES.txt?view=diff&rev=517869&r1=517868&r2=517869
==============================================================================
--- lucene/hadoop/trunk/CHANGES.txt (original)
+++ lucene/hadoop/trunk/CHANGES.txt Tue Mar 13 14:04:10 2007
@@ -46,6 +46,9 @@
     different replica is found when handling ChecksumException.
     (Hairong Kuang via tomwhite)
 
+14. HADOOP-1070.  Fix a problem with number of racks and datanodes
+    temporarily doubling.  (Konstantin Shvachko via tomwhite)
+
 
 Release 0.12.0 - 2007-03-02
 

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=517869&r1=517868&r2=517869
==============================================================================
--- lucene/hadoop/trunk/src/java/org/apache/hadoop/dfs/FSNamesystem.java (original)
+++ lucene/hadoop/trunk/src/java/org/apache/hadoop/dfs/FSNamesystem.java Tue Mar 13 14:04:10
2007
@@ -1562,6 +1562,7 @@
       DatanodeDescriptor nodeDescr 
               = new DatanodeDescriptor( nodeReg, networkLocation, hostName );
       unprotectedAddDatanode( nodeDescr );
+      clusterMap.add(nodeDescr);
       getEditLog().logAddDatanode( nodeDescr );
       
       // also treat the registration message as a heartbeat
@@ -1890,7 +1891,6 @@
     
     void unprotectedAddDatanode( DatanodeDescriptor nodeDescr ) {
       datanodeMap.put( nodeDescr.getStorageID(), nodeDescr );
-      clusterMap.add(nodeDescr);
       NameNode.stateChangeLog.debug(
           "BLOCK* NameSystem.unprotectedAddDatanode: "
           + "node " + nodeDescr.getName() + " is added to datanodeMap." );

Modified: lucene/hadoop/trunk/src/java/org/apache/hadoop/net/NetworkTopology.java
URL: http://svn.apache.org/viewvc/lucene/hadoop/trunk/src/java/org/apache/hadoop/net/NetworkTopology.java?view=diff&rev=517869&r1=517868&r2=517869
==============================================================================
--- lucene/hadoop/trunk/src/java/org/apache/hadoop/net/NetworkTopology.java (original)
+++ lucene/hadoop/trunk/src/java/org/apache/hadoop/net/NetworkTopology.java Tue Mar 13 14:04:10
2007
@@ -197,9 +197,7 @@
                     }
                 }
                 if(parentNode==null) {
-                    throw new IllegalArgumentException( n.getName()
-                            + ", which is located at "
-                            + parent+", is not a decendent of " + currentPath);
+                    return false;
                 }
                 // remove n from the parent node
                 boolean isRemoved = parentNode.remove( n );



Mime
View raw message