hadoop-common-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From hair...@apache.org
Subject svn commit: r727869 - in /hadoop/core/trunk: CHANGES.txt src/test/org/apache/hadoop/hdfs/server/namenode/TestNodeCount.java
Date Fri, 19 Dec 2008 00:45:27 GMT
Author: hairong
Date: Thu Dec 18 16:45:27 2008
New Revision: 727869

URL: http://svn.apache.org/viewvc?rev=727869&view=rev
Log:
HADOOP-4840. TestNodeCount sometimes fails with NullPointerException. Contributed by Hairong
Kuang.

Modified:
    hadoop/core/trunk/CHANGES.txt
    hadoop/core/trunk/src/test/org/apache/hadoop/hdfs/server/namenode/TestNodeCount.java

Modified: hadoop/core/trunk/CHANGES.txt
URL: http://svn.apache.org/viewvc/hadoop/core/trunk/CHANGES.txt?rev=727869&r1=727868&r2=727869&view=diff
==============================================================================
--- hadoop/core/trunk/CHANGES.txt (original)
+++ hadoop/core/trunk/CHANGES.txt Thu Dec 18 16:45:27 2008
@@ -1578,6 +1578,9 @@
     HADOOP-4797. Improve how RPC server reads and writes large buffers. Avoids
     soft-leak of direct buffers and excess copies in NIO layer. (Raghu Angadi)
 
+    HADOOP-4840. TestNodeCount sometimes fails with NullPointerException.
+    (hairong)
+
 Release 0.18.2 - 2008-11-03
 
   BUG FIXES

Modified: hadoop/core/trunk/src/test/org/apache/hadoop/hdfs/server/namenode/TestNodeCount.java
URL: http://svn.apache.org/viewvc/hadoop/core/trunk/src/test/org/apache/hadoop/hdfs/server/namenode/TestNodeCount.java?rev=727869&r1=727868&r2=727869&view=diff
==============================================================================
--- hadoop/core/trunk/src/test/org/apache/hadoop/hdfs/server/namenode/TestNodeCount.java (original)
+++ hadoop/core/trunk/src/test/org/apache/hadoop/hdfs/server/namenode/TestNodeCount.java Thu
Dec 18 16:45:27 2008
@@ -61,7 +61,9 @@
       // check if excessive replica is detected
       NumberReplicas num = null;
       do {
-       num = namesystem.countNodes(block);
+       synchronized (namesystem) {
+         num = namesystem.countNodes(block);
+       }
       } while (num.excessReplicas() == 0);
       
       // find out a non-excess node



Mime
View raw message