sodonnel commented on PR #3781:
URL: https://github.com/apache/ozone/pull/3781#issuecomment-1305870740
```
"tag.datanode.1" : "ozone-datanode-3.ozone_default",
"tag.Hostname.1" : "39160451dea0",
"TrackedUnderReplicatedDN.1" : 1,
"tag.datanode.2" : "ozone-datanode-3.ozone_default",
"tag.Hostname.2" : "39160451dea0",
"TrackedSufficientlyReplicatedDN.2" : 0,
"tag.datanode.3" : "ozone-datanode-3.ozone_default",
"tag.Hostname.3" : "39160451dea0",
"TrackedPipelinesWaitingToCloseDN.3" : 0,
"tag.datanode.4" : "ozone-datanode-3.ozone_default",
"tag.Hostname.4" : "39160451dea0",
"TrackedUnhealthyContainersDN.4" : 0
```
Its a bit strange that we have 4 tags for the same DN. The way I'd expect
this to work is we have 1 tag per DN, and then the 4 metrics (under,
sufficiently, pipelines, unhealthy) all sharing that tag.
I **think** this is due to the way you are adding the tags in `getMetrics` -
you are building a new tag per metric, rather than a tag per DN and then
tagging all its metrics with that tag.
It might be easier if you simply stored a Set or Map of
`ContainerStateInWorkflow` inside the metrics class, as then you can iterate it
on a host by host basis.
Example of what I mean, plus more simplifications -
https://github.com/sodonnel/hadoop-ozone/commit/673109c0403c69265fd100499373002e37ddfbc0
--
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]