-
Notifications
You must be signed in to change notification settings - Fork 593
HDDS-13555. Remove redundant field for metrics registry #9456
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
base: master
Are you sure you want to change the base?
Conversation
|
Thanks @0lai0 for working on this. Please check PMD failure: https://github.com/0lai0/ozone/actions/runs/20005708495/job/57367989254 |
|
Sure, Thanks @adoroszlai for review. I think there is a lot failure I need to modify. |
|
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. |
| @SuppressWarnings("PMD.SingularField") | ||
| protected MetricsRegistry registry; |
There was a problem hiding this comment.
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.
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