priyeshkaratha commented on code in PR #9754:
URL: https://github.com/apache/ozone/pull/9754#discussion_r2799158382
##########
hadoop-ozone/recon/src/main/java/org/apache/hadoop/ozone/recon/api/ClusterStateEndpoint.java:
##########
@@ -119,18 +117,34 @@ public Response getClusterState() {
this.containerManager.getContainerStateCount(
HddsProtos.LifeCycleState.DELETED));
- int healthyDatanodes =
+ int healthyDataNodes =
nodeManager.getNodeCount(NodeStatus.inServiceHealthy()) +
nodeManager.getNodeCount(NodeStatus.inServiceHealthyReadOnly());
SCMNodeStat stats = nodeManager.getStats();
+ long fsCapacity = 0;
+ long fsUsed = 0;
+ long fsAvailable = 0;
+
+ for (DatanodeInfo datanode : nodeManager.getAllNodes()) {
+ SpaceUsageSource.Fixed fsUsage =
nodeManager.getTotalFilesystemUsage(datanode);
+ if (fsUsage != null) {
+ fsCapacity += fsUsage.getCapacity();
+ fsAvailable += fsUsage.getAvailable();
+ fsUsed += fsUsage.getUsedSpace();
+ }
+ }
Review Comment:
Added the changes.
--
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]