[
https://issues.apache.org/jira/browse/HDFS-15016?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=16983104#comment-16983104
]
Ayush Saxena commented on HDFS-15016:
-------------------------------------
Thanx [~elgoiri] for the report.
Makes sense to correct and the proposed fix too seems straightforward.
A way to refactor could be like this too :
{code:java}
DatanodeInfo existingNodeId = datanodesMap.get(nodeId);
if (existingNodeId == null ||
node.getLastUpdate() > existingNodeId.getLastUpdate())
{code}
Not sure whether it will save anything or not, just give a check once you
upload the fix, otherwise I am Ok with the way in the comment too. :)
> RBF: getDatanodeReport() should return the latest update
> --------------------------------------------------------
>
> Key: HDFS-15016
> URL: https://issues.apache.org/jira/browse/HDFS-15016
> Project: Hadoop HDFS
> Issue Type: Improvement
> Reporter: Íñigo Goiri
> Priority: Major
>
> Currently, when the Router calls getDatanodeReport() (or
> getDatanodeStorageReport()) and the DN is in multiple clusters, it just takes
> the one that comes first. It should consider the latest update.
--
This message was sent by Atlassian Jira
(v8.3.4#803005)
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]