sodonnel commented on code in PR #5688:
URL: https://github.com/apache/ozone/pull/5688#discussion_r1407781877
##########
hadoop-hdds/server-scm/src/main/java/org/apache/hadoop/hdds/scm/node/NodeDecommissionMetrics.java:
##########
@@ -135,10 +135,13 @@ public long getUnhealthyContainers() {
private Map<String, ContainerStateInWorkflow> metricsByHost;
+ private Map<String, Long> startTimeByHost;
+
/** Private constructor. */
private NodeDecommissionMetrics() {
this.registry = new MetricsRegistry(METRICS_SOURCE_NAME);
metricsByHost = new HashMap<>();
+ startTimeByHost = new HashMap<>();
Review Comment:
All the host specific metrics are stored in `private Map<String,
ContainerStateInWorkflow> metricsByHost;` right now. Could we extend
ContainerStateInWorkflow to also carry the start time and use the same
structure for storing this?
Then you could also add a static constant for the MetricsInfo, like the
existing ones:
```
private static final MetricsInfo HOST_SUFFICIENTLY_REPLICATED = Interns
.info(
"SufficientlyReplicatedDN",
"Number of sufficiently replicated containers "
+ "for host in decommissioning and "
+ "maintenance mode");
```
Then you would just need to add a getter for `getWorkflowStartTimeByHost` to
retrieve the value.
--
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]