hadoop-hdfs-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From c..@apache.org
Subject svn commit: r1186556 - in /hadoop/common/branches/branch-0.22/hdfs: CHANGES.txt src/test/hdfs/org/apache/hadoop/hdfs/server/namenode/TestNodeCount.java
Date Wed, 19 Oct 2011 23:05:44 GMT
Author: cos
Date: Wed Oct 19 23:05:44 2011
New Revision: 1186556

URL: http://svn.apache.org/viewvc?rev=1186556&view=rev
Log:
HDFS-2451. TestNodeCount.testNodeCount failes with NPE. Contributed by Konstantin Boudnik.

Modified:
    hadoop/common/branches/branch-0.22/hdfs/CHANGES.txt
    hadoop/common/branches/branch-0.22/hdfs/src/test/hdfs/org/apache/hadoop/hdfs/server/namenode/TestNodeCount.java

Modified: hadoop/common/branches/branch-0.22/hdfs/CHANGES.txt
URL: http://svn.apache.org/viewvc/hadoop/common/branches/branch-0.22/hdfs/CHANGES.txt?rev=1186556&r1=1186555&r2=1186556&view=diff
==============================================================================
--- hadoop/common/branches/branch-0.22/hdfs/CHANGES.txt (original)
+++ hadoop/common/branches/branch-0.22/hdfs/CHANGES.txt Wed Oct 19 23:05:44 2011
@@ -648,6 +648,8 @@ Release 0.22.0 - Unreleased
     HDFS-2286. DataXceiverServer logs AsynchronousCloseException at shutdown
     (Todd Lipcon and Uma Maheswara Rao G via shv)
 
+    HDFS-2451. TestNodeCount.testNodeCount failes with NPE (cos)
+
 Release 0.21.1 - Unreleased
 
   IMPROVEMENTS

Modified: hadoop/common/branches/branch-0.22/hdfs/src/test/hdfs/org/apache/hadoop/hdfs/server/namenode/TestNodeCount.java
URL: http://svn.apache.org/viewvc/hadoop/common/branches/branch-0.22/hdfs/src/test/hdfs/org/apache/hadoop/hdfs/server/namenode/TestNodeCount.java?rev=1186556&r1=1186555&r2=1186556&view=diff
==============================================================================
--- hadoop/common/branches/branch-0.22/hdfs/src/test/hdfs/org/apache/hadoop/hdfs/server/namenode/TestNodeCount.java
(original)
+++ hadoop/common/branches/branch-0.22/hdfs/src/test/hdfs/org/apache/hadoop/hdfs/server/namenode/TestNodeCount.java
Wed Oct 19 23:05:44 2011
@@ -107,7 +107,9 @@ public class TestNodeCount extends TestC
       
       // The block should be replicated
       do {
+        namesystem.writeLock();
         num = namesystem.blockManager.countNodes(block);
+        namesystem.writeUnlock();
       } while (num.liveReplicas() != REPLICATION_FACTOR);
       
       // restart the first datanode
@@ -116,7 +118,9 @@ public class TestNodeCount extends TestC
       
       // check if excessive replica is detected
       do {
-       num = namesystem.blockManager.countNodes(block);
+        namesystem.writeLock();
+        num = namesystem.blockManager.countNodes(block);
+        namesystem.writeUnlock();
       } while (num.excessReplicas() != 2);
     } finally {
       cluster.shutdown();



Mime
View raw message