Skip to content
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

[SpotBugs] Fix UWF_UNWRITTEN_PUBLIC_OR_PROTECTED_FIELD #536

Merged
merged 6 commits into from
Feb 2, 2023

Conversation

kaijchen
Copy link
Contributor

@kaijchen kaijchen commented Feb 1, 2023

What changes were proposed in this pull request?

Remove UWF_UNWRITTEN_PUBLIC_OR_PROTECTED_FIELD from spotbugs-exclude.xml and fix violations.

Why are the changes needed?

Sub-task of #532 - Fix UWF_UNWRITTEN_PUBLIC_OR_PROTECTED_FIELD.

Does this PR introduce any user-facing change?

No.

How was this patch tested?

CI.

@codecov-commenter
Copy link

Codecov Report

Merging #536 (44b1e5c) into master (721b22c) will decrease coverage by 0.04%.
The diff coverage is 50.00%.

@@             Coverage Diff              @@
##             master     #536      +/-   ##
============================================
- Coverage     60.23%   60.19%   -0.04%     
+ Complexity     1785     1784       -1     
============================================
  Files           205      205              
  Lines         11557    11561       +4     
  Branches       1042     1042              
============================================
- Hits           6961     6959       -2     
- Misses         4189     4194       +5     
- Partials        407      408       +1     
Impacted Files Coverage Δ
...org/apache/uniffle/common/metrics/GRPCMetrics.java 43.83% <0.00%> (-2.55%) ⬇️
...fle/coordinator/metric/CoordinatorGrpcMetrics.java 100.00% <100.00%> (ø)
...pache/uniffle/server/ShuffleServerGrpcMetrics.java 100.00% <100.00%> (ø)
...ategy/storage/AppBalanceSelectStorageStrategy.java 72.00% <0.00%> (-4.00%) ⬇️

📣 We’re building smart automated test selection to slash your CI/CD build times. Learn more

@@ -35,8 +35,8 @@ public class CoordinatorGrpcMetrics extends GRPCMetrics {

@Override
public void registerMetrics() {
gaugeGrpcOpen = metricsManager.addGauge(GRPC_OPEN);
counterGrpcTotal = metricsManager.addCounter(GRPC_TOTAL);
setGaugeGrpcOpen(metricsManager.addGauge(GRPC_OPEN));
Copy link
Contributor

Choose a reason for hiding this comment

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

These two lines are same with ShuffleServer. isn't better to just initialize these metrics in parent class?

@advancedxy
Copy link
Contributor

The code is fine with me. But I'm not sure why we treat GRPC_OPEN and GRPC_TOTAL differently.
See @zuston if you have more input.

@kaijchen
Copy link
Contributor Author

kaijchen commented Feb 2, 2023

The code is fine with me. But I'm not sure why we treat GRPC_OPEN and GRPC_TOTAL differently.

It's written by different authors. Maybe because GRPC_OPEN and GRPC_TOTAL are accessed more frequently.

@zuston
Copy link
Member

zuston commented Feb 2, 2023

The code is fine with me. But I'm not sure why we treat GRPC_OPEN and GRPC_TOTAL differently. See @zuston if you have more input.

Nice catch.

@kaijchen kaijchen merged commit a45be20 into apache:master Feb 2, 2023
@kaijchen kaijchen deleted the uwf branch February 2, 2023 08:01
@kaijchen
Copy link
Contributor Author

kaijchen commented Feb 2, 2023

Thanks @advancedxy for the review.

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.

4 participants