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

[MINOR] Fix inefficient map iteration #245

Merged
merged 1 commit into from
Sep 27, 2022
Merged

Conversation

kaijchen
Copy link
Contributor

What changes were proposed in this pull request?

Iterate Map by Map.entrySet() instead of Map.keySet() + Map.get(key).

Why are the changes needed?

It's more efficient.

Does this PR introduce any user-facing change?

No.

How was this patch tested?

CI.

@jerqi jerqi requested a review from zuston September 27, 2022 03:43
@codecov-commenter
Copy link

codecov-commenter commented Sep 27, 2022

Codecov Report

Merging #245 (5e0dd40) into master (75921f1) will increase coverage by 0.08%.
The diff coverage is 100.00%.

@@             Coverage Diff              @@
##             master     #245      +/-   ##
============================================
+ Coverage     59.10%   59.18%   +0.08%     
- Complexity     1330     1333       +3     
============================================
  Files           160      160              
  Lines          8740     8740              
  Branches        821      821              
============================================
+ Hits           5166     5173       +7     
+ Misses         3307     3302       -5     
+ Partials        267      265       -2     
Impacted Files Coverage Δ
...nator/LowestIOSampleCostSelectStorageStrategy.java 74.07% <100.00%> (+0.92%) ⬆️
...pache/hadoop/mapreduce/task/reduce/RssFetcher.java 90.62% <0.00%> (+1.56%) ⬆️
...org/apache/uniffle/server/ShuffleFlushManager.java 78.33% <0.00%> (+1.66%) ⬆️
...storage/handler/impl/DataSkippableReadHandler.java 84.37% <0.00%> (+3.12%) ⬆️

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

@zuston zuston merged commit 0645ebe into apache:master Sep 27, 2022
@zuston
Copy link
Member

zuston commented Sep 27, 2022

Thanks for your contribution! @kaijchen

@kaijchen
Copy link
Contributor Author

Thanks @zuston for the review.

@kaijchen kaijchen deleted the map-iter branch September 27, 2022 06:02
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.

None yet

3 participants