[ 
https://issues.apache.org/jira/browse/HADOOP-1092?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel#action_12479411
 ] 

dhruba borthakur commented on HADOOP-1092:
------------------------------------------

A Datanode times-out and is declared dead by the Namenode. The Namenode invokes 
removeDatanode. This Datanode has a block that has only one replica.

Inside removeStoredBlock(), we remove this block from the blocksMap and then 
call neededReplication. update(block, -1, 0). Inside update(), we call 
blocksMap.get() and we fail to find the block becaase we have just removed it. 
Hence the null-pointer exception.



> NullPointerException in HeartbeatMonitor thread
> -----------------------------------------------
>
>                 Key: HADOOP-1092
>                 URL: https://issues.apache.org/jira/browse/HADOOP-1092
>             Project: Hadoop
>          Issue Type: Bug
>          Components: dfs
>    Affects Versions: 0.12.0
>            Reporter: Nigel Daley
>            Priority: Blocker
>             Fix For: 0.12.1
>
>
> Running NNBench with latest trunk, I saw this NPE in the Namenode log:
>    Exception in thread "[EMAIL PROTECTED]" java.lang.NullPointerException
>         at 
> org.apache.hadoop.dfs.FSNamesystem.countContainingNodes(FSNamesystem.java:2506)
>         at org.apache.hadoop.dfs.FSNamesystem.access$000(FSNamesystem.java:52)
>         at 
> org.apache.hadoop.dfs.FSNamesystem$UnderReplicationBlocks.update(FSNamesystem.java:456)
>         at 
> org.apache.hadoop.dfs.FSNamesystem.removeStoredBlock(FSNamesystem.java:2242)
>         at 
> org.apache.hadoop.dfs.FSNamesystem.removeDatanode(FSNamesystem.java:1876)
>         at 
> org.apache.hadoop.dfs.FSNamesystem.heartbeatCheck(FSNamesystem.java:1958)
>         at 
> org.apache.hadoop.dfs.FSNamesystem$HeartbeatMonitor.run(FSNamesystem.java:1698)
>         at java.lang.Thread.run(Thread.java:619)

-- 
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.

Reply via email to