[
https://issues.apache.org/jira/browse/HDFS-17331?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=17805991#comment-17805991
]
ASF GitHub Bot commented on HDFS-17331:
---------------------------------------
zhangshuyan0 commented on code in PR #6429:
URL: https://github.com/apache/hadoop/pull/6429#discussion_r1450227729
##########
hadoop-hdfs-project/hadoop-hdfs-rbf/src/main/java/org/apache/hadoop/hdfs/server/federation/router/RouterClientProtocol.java:
##########
@@ -1105,6 +1105,8 @@ private DatanodeStorageReport[] mergeDtanodeStorageReport(
dnInfo.getLastUpdate() > oldDn.getDatanodeInfo().getLastUpdate()) {
datanodesMap.put(nodeId, dn);
Review Comment:
If `dnInfo.getLastUpdate() > oldDn.getDatanodeInfo().getLastUpdate())`,
should we still need to add `oldDn.getDatanodeInfo().getNumBlocks()` and
`dnInfo.getNumBlocks()` ?
##########
hadoop-hdfs-project/hadoop-hdfs-client/src/main/java/org/apache/hadoop/hdfs/protocolPB/PBHelperClient.java:
##########
@@ -795,7 +798,12 @@ static public DatanodeInfo convert(DatanodeInfoProto di) {
long nonDFSUsed = di.getCapacity() - di.getDfsUsed() - di.getRemaining();
dinfo.setNonDfsUsed(nonDFSUsed < 0 ? 0 : nonDFSUsed);
}
- return dinfo.build();
+
+ DatanodeInfo buildInfo = dinfo.build();
+ if (di.hasSoftwareVersion()) {
Review Comment:
How about modifying class `DatanodeInfoBuilder` directly?
> Fix Blocks are always -1 and DataNode`s version are always UNKNOWN in
> federationhealth.html
> -------------------------------------------------------------------------------------------
>
> Key: HDFS-17331
> URL: https://issues.apache.org/jira/browse/HDFS-17331
> Project: Hadoop HDFS
> Issue Type: Improvement
> Reporter: lei w
> Priority: Major
> Labels: pull-request-available
> Attachments: 截屏2024-01-08 下午8.17.07.png
>
>
> Blocks are always -1 and DataNode`s version are always UNKNOWN in
> federationhealth.html
--
This message was sent by Atlassian Jira
(v8.20.10#820010)
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]