Skip to content

Conversation

@kaijchen
Copy link
Member

@kaijchen kaijchen commented Jan 31, 2023

What changes were proposed in this pull request?

  1. Fix REC_CATCH_EXCEPTION violations (ignored one case).
  2. Remove REC_CATCH_EXCEPTION from SpotBugs exclusion.

Why are the changes needed?

Sub-task of #532 - Fix REC_CATCH_EXCEPTION.

Does this PR introduce any user-facing change?

No.

How was this patch tested?

CI.

@kaijchen kaijchen requested a review from advancedxy January 31, 2023 08:42
@codecov-commenter
Copy link

codecov-commenter commented Jan 31, 2023

Codecov Report

Merging #527 (faf69d6) into master (6367b36) will increase coverage by 0.10%.
The diff coverage is 0.00%.

@@             Coverage Diff              @@
##             master     #527      +/-   ##
============================================
+ Coverage     60.11%   60.21%   +0.10%     
- Complexity     1769     1784      +15     
============================================
  Files           205      205              
  Lines         11532    11557      +25     
  Branches       1033     1042       +9     
============================================
+ Hits           6932     6959      +27     
+ Misses         4194     4190       -4     
- Partials        406      408       +2     
Impacted Files Coverage Δ
...apache/hadoop/mapreduce/v2/app/RssMRAppMaster.java 0.00% <0.00%> (ø)
.../org/apache/uniffle/common/config/ConfigUtils.java 95.55% <0.00%> (ø)
.../apache/uniffle/coordinator/ClientConfManager.java 92.95% <0.00%> (ø)
...inator/access/checker/AccessCandidatesChecker.java 85.50% <0.00%> (ø)
.../storage/handler/impl/HdfsShuffleWriteHandler.java 87.09% <0.00%> (ø)
...le/storage/handler/impl/LocalFileWriteHandler.java 75.51% <0.00%> (ø)
...rg/apache/uniffle/storage/common/LocalStorage.java 48.36% <0.00%> (-1.97%) ⬇️
...he/uniffle/client/impl/ShuffleWriteClientImpl.java 34.95% <0.00%> (+5.49%) ⬆️

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

@kaijchen kaijchen requested a review from zuston January 31, 2023 09:57
@advancedxy
Copy link
Contributor

advancedxy commented Jan 31, 2023

Cloud you add an umbrella issue to track all the spotbugs improvements?
You may don't have to create sub-issues for each pattern, but it's good to tracking all the improvements in the umbrella issue.

if (!baseFolder.exists()) {
try {
// try to create folder, it may be created by other Shuffle Server
baseFolder.mkdirs();
Copy link
Member Author

Choose a reason for hiding this comment

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

Return value is ignored: false means failure.

if (!baseFolder.isDirectory() && !baseFolder.mkdirs()) {
// if folder is not created successfully, make sure it exists
if (!baseFolder.isDirectory()) {
LOG.error("Can't create shuffle folder: {}", basePath);
Copy link
Contributor

Choose a reason for hiding this comment

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

the logging should be more verbose about whether this is a file or not.

Another things is that when basePath could not be created, a runtime exception should be raised.

Copy link
Member Author

Choose a reason for hiding this comment

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

After a second thought, let's just focus on spotbug issues in this PR.
The createBasePath() can be fixed in another PR.

Copy link
Contributor

Choose a reason for hiding this comment

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

SGTM

Copy link
Contributor

@advancedxy advancedxy left a comment

Choose a reason for hiding this comment

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

LGTM

@kaijchen kaijchen merged commit 721b22c into apache:master Feb 1, 2023
@kaijchen
Copy link
Member Author

kaijchen commented Feb 1, 2023

Thanks @advancedxy for the review.

@kaijchen kaijchen deleted the catch-exception branch February 1, 2023 07:51
@kaijchen kaijchen removed the request for review from zuston February 1, 2023 07:51
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.

3 participants