فهرست منبع

Merge -r 727868:727869 from trunk to move the change log of HADOOP-4840 into section 0.18.3.

git-svn-id: https://svn.apache.org/repos/asf/hadoop/core/branches/branch-0.18@727875 13f79535-47bb-0310-9956-ffa450edef68
Hairong Kuang 16 سال پیش
والد
کامیت
9d7dfd4fe0
2فایلهای تغییر یافته به همراه6 افزوده شده و 1 حذف شده
  1. 3 0
      CHANGES.txt
  2. 3 1
      src/test/org/apache/hadoop/dfs/TestNodeCount.java

+ 3 - 0
CHANGES.txt

@@ -110,6 +110,9 @@ Release 0.18.3 - Unreleased
     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

+ 3 - 1
src/test/org/apache/hadoop/dfs/TestNodeCount.java

@@ -61,7 +61,9 @@ public class TestNodeCount extends TestCase {
       // 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