[
https://issues.apache.org/jira/browse/HDFS-5216?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=13772057#comment-13772057
]
Trevor Lorimer commented on HDFS-5216:
--------------------------------------
I have checked this on my cluster, where I added a datanode to the exclude file
which decommissions a node, if the datanode is live it will be added to the
Live Decommissioned count, if the datanode is stopped it will be added to the
Dead Decommissioned count, which makes sense.
There is however a bug in the code I submitted where the Dead count ends up
being the same as the Live count, the following line need to be changed:
getBlockManager().getDatanodeManager().fetchDatanodes(dead, null, true);
should be:
getBlockManager().getDatanodeManager().fetchDatanodes(null, dead, true);
> NumDecomDeadDataNodes not returning correct number of dead decommissioned
> nodes
> --------------------------------------------------------------------------------
>
> Key: HDFS-5216
> URL: https://issues.apache.org/jira/browse/HDFS-5216
> Project: Hadoop HDFS
> Issue Type: Bug
> Affects Versions: 2.1.0-beta
> Reporter: Trevor Lorimer
>
> For HDFS-4860 I essentially copied the process in
> NamenodejspHelper.generateHealthReport(), so it would be in sync with the
> original dfsHealth.jsp.
> However looking at this now there may be a bug? in
> getNumDecomDeadDataNodes(), where:
> getBlockManager().getDatanodeManager().fetchDatanodes(dead, null, true);
>
> Where the parameter true indicates that decommissioned nodes should be
> removed from the list.
> If the flag is true fetchDatanodes calls removeDecomNodeFromList, which will
> remove a node if an existing datanode does not appear in both include or
> exclude lists and it has been decommissioned.
> If I am looking to return the Number of Dead Decommissioned Nodes, should I
> change the remove decommissioned nodes flag to False? i.e.:
> getBlockManager().getDatanodeManager().fetchDatanodes(null, dead, false);
--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators
For more information on JIRA, see: http://www.atlassian.com/software/jira