[
https://issues.apache.org/jira/browse/HDFS-2451?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=13130584#comment-13130584
]
Uma Maheswara Rao G commented on HDFS-2451:
-------------------------------------------
Hi Cos,
I too think that was the cause. There is one more place in the test, where it
is not taking the lock on fsnamesystem.
{code}
// The block should be replicated
do {
num = namesystem.blockManager.countNodes(block);
} while (num.liveReplicas() != REPLICATION_FACTOR);
{code}
Do you have any reason for not putting lock here?
Thanks
Uma
> TestNodeCount.testNodeCount failes with NPE
> -------------------------------------------
>
> Key: HDFS-2451
> URL: https://issues.apache.org/jira/browse/HDFS-2451
> Project: Hadoop HDFS
> Issue Type: Bug
> Components: name-node
> Affects Versions: 0.22.0
> Reporter: Konstantin Boudnik
> Priority: Blocker
> Attachments: HDFS-2451.patch
>
>
> in the [commit build #97|http://is.gd/UPuXg2] TestNodeCount.testNodeCount
> failed with NPE
> {noformat}
> java.lang.NullPointerException
> at
> org.apache.hadoop.hdfs.server.namenode.BlockManager.countNodes(BlockManager.java:1436)
> at
> org.apache.hadoop.hdfs.server.namenode.TestNodeCount.__CLR2_4_39bdgm6whp(TestNodeCount.java:119)
> at
> org.apache.hadoop.hdfs.server.namenode.TestNodeCount.testNodeCount(TestNodeCount.java:40)
> {noformat}
--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators:
https://issues.apache.org/jira/secure/ContactAdministrators!default.jspa
For more information on JIRA, see: http://www.atlassian.com/software/jira