[ 
https://issues.apache.org/jira/browse/HDFS-17331?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=17805995#comment-17805995
 ] 

ASF GitHub Bot commented on HDFS-17331:
---------------------------------------

ThinkerLei commented on code in PR #6429:
URL: https://github.com/apache/hadoop/pull/6429#discussion_r1450236578


##########
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:
   @zhangshuyan0 Thank you very much for your comment, I will modify it soon.





> 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]

Reply via email to