ChenSammi commented on code in PR #9488:
URL: https://github.com/apache/ozone/pull/9488#discussion_r2630923089
##########
hadoop-ozone/recon/src/main/java/org/apache/hadoop/ozone/recon/api/StorageDistributionEndpoint.java:
##########
@@ -221,6 +221,7 @@ private long calculateCommittedSize() {
private DatanodeStorageReport getStorageReport(DatanodeDetails datanode) {
try {
SCMNodeMetric nodeMetric = nodeManager.getNodeStat(datanode);
+ long reservedSpace = nodeManager.getTotalReserved(datanode);
Review Comment:
StorageReportProto has the reserved space value, so SCM has this
information(#9338). Currently SCM just doesn't populate the info to SCMNodeStat
and SCMNodeMetric.
` ozone admin datanode usageinfo` command gets all info from the
scmClient.getDatanodeUsageInfo(). You can check if Recon has use the same way.
Otherwise populate the reserved space value in SCMNodeStat and SCMNodeMetric is
preferred. It's not an issue if multiple classes are required to update. The
only thing matters is it's the right/better way.
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: [email protected]
For queries about this service, please contact Infrastructure at:
[email protected]
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]