Skip to content

Conversation

@0lai0
Copy link
Contributor

@0lai0 0lai0 commented Dec 7, 2025

What changes were proposed in this pull request?

Remove Redundant Metrics Registry.
Refactor the code to delete the private MetricsRegistry registry; variable and remove its initialization logic from the constructor or init() method.

What is the link to the Apache JIRA

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

@adoroszlai adoroszlai marked this pull request as draft December 7, 2025 15:33
@adoroszlai
Copy link
Contributor

Thanks @0lai0 for working on this. Please check PMD failure: https://github.com/0lai0/ozone/actions/runs/20005708495/job/57367989254

@0lai0
Copy link
Contributor Author

0lai0 commented Dec 8, 2025

Sure, Thanks @adoroszlai for review. I think there is a lot failure I need to modify.

@github-actions
Copy link

github-actions bot commented Jan 3, 2026

This PR has been marked as stale due to 21 days of inactivity. Please comment or remove the stale label to keep it open. Otherwise, it will be automatically closed in 7 days.

@github-actions github-actions bot added the stale label Jan 3, 2026
Comment on lines +33 to +34
@SuppressWarnings("PMD.SingularField")
protected MetricsRegistry registry;
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This causes checkstyle and findbugs failure.

hadoop-hdds/common/src/main/java/org/apache/hadoop/hdds/utils/BaseMetricsSource.java
 34: Variable 'registry' must be private and have accessor methods.
M D UuF: Unused public or protected field: org.apache.hadoop.hdds.utils.BaseMetricsSource.registry  In BaseMetricsSource.java

Also, please try not to add suppression in new code.

@github-actions github-actions bot removed the stale label Jan 8, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants