sodonnel commented on code in PR #3781: URL: https://github.com/apache/ozone/pull/3781#discussion_r1001605393
########## hadoop-hdds/server-scm/src/main/java/org/apache/hadoop/hdds/scm/node/DatanodeAdminMonitorImpl.java: ########## @@ -168,6 +225,43 @@ public int getTrackedNodeCount() { return trackedNodes.size(); } + synchronized void setMetricsToGauge() { + metrics.setTrackedContainersUnhealthyTotal(unhealthyContainers); + metrics.setTrackedRecommissionNodesTotal(trackedRecommission); + metrics.setTrackedDecommissioningMaintenanceNodesTotal( + trackedDecomMaintenance); + metrics.setTrackedContainersUnderReplicatedTotal( + underReplicatedContainers); + metrics.setTrackedContainersSufficientlyReplicatedTotal( + sufficientlyReplicatedContainers); + metrics.setTrackedPipelinesWaitingToCloseTotal(pipelinesWaitingToClose); + for (Map.Entry<String, Long> e : + pipelinesWaitingToCloseByHost.entrySet()) { + metrics.metricRecordPipelineWaitingToCloseByHost(e.getKey(), + e.getValue()); + } + for (Map.Entry<String, ContainerStateInWorkflow> e : Review Comment: Huum, looks like you are correct. I wonder what the best approach is here. I don't think its a great user experience if we start with no individual nodes track, and then over time (in a long running SCM) more and more nodes get added for maintenance and decommission and the number builds up all with zero counts. I guess its not a major problem, but it would be nice to resolve it somehow. -- 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: issues-unsubscr...@ozone.apache.org For queries about this service, please contact Infrastructure at: us...@infra.apache.org --------------------------------------------------------------------- To unsubscribe, e-mail: issues-unsubscr...@ozone.apache.org For additional commands, e-mail: issues-h...@ozone.apache.org