You are viewing a plain text version of this content. The canonical link for it is here.
Posted to issues@ozone.apache.org by "Chen-Jheng Sing (Jira)" <ji...@apache.org> on 2025/11/03 15:21:00 UTC

[jira] (HDDS-13555) Remove redundant field for metrics registry

    [ https://issues.apache.org/jira/browse/HDDS-13555 ]


    Chen-Jheng Sing deleted comment on HDDS-13555:
    ----------------------------------------

was (Author: JIRAUSER311294):
Hi, I'm interested in this issue.
May I give it a try?
Thank you!

> Remove redundant field for metrics registry
> -------------------------------------------
>
>                 Key: HDDS-13555
>                 URL: https://issues.apache.org/jira/browse/HDDS-13555
>             Project: Apache Ozone
>          Issue Type: Improvement
>            Reporter: Ivan Zlenko
>            Priority: Major
>
> Right now we always maintain a field for metrics registry, though it feels like it is completely redundant here. 
> We need to refactor this place, to clean up smelly code. 
> Example of such field could be found in XceiverClientMetrics.class:
> {code:java}
> public class XceiverClientMetrics implements MetricsSource {
>   public static final String SOURCE_NAME = XceiverClientMetrics.class
>       .getSimpleName();
>   private @Metric MutableCounterLong pendingOps;
>   private @Metric MutableCounterLong totalOps;
>   private @Metric MutableCounterLong ecReconstructionTotal;
>   private @Metric MutableCounterLong ecReconstructionFailsTotal;
>   private EnumMap<ContainerProtos.Type, MutableCounterLong> pendingOpsArray;
>   private EnumMap<ContainerProtos.Type, MutableCounterLong> opsArray;
>   private EnumMap<ContainerProtos.Type, PerformanceMetrics> containerOpsLatency;
>   private MetricsRegistry registry;
>   private int[] intervals;
>   public XceiverClientMetrics() {
>     OzoneConfiguration conf = new OzoneConfiguration();
>     intervals = conf.getInts(OzoneConfigKeys.OZONE_XCEIVER_CLIENT_METRICS_PERCENTILES_INTERVALS_SECONDS_KEY);
>     init();
>   }
>   public void init() {
>     this.registry = new MetricsRegistry(SOURCE_NAME);
> {code}



--
This message was sent by Atlassian Jira
(v8.20.10#820010)

---------------------------------------------------------------------
To unsubscribe, e-mail: issues-unsubscribe@ozone.apache.org
For additional commands, e-mail: issues-help@ozone.apache.org