-
Notifications
You must be signed in to change notification settings - Fork 153
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
[Improvement] Only report to the shuffle servers that owns the blocks #539
Conversation
Codecov Report
@@ Coverage Diff @@
## master #539 +/- ##
============================================
- Coverage 60.25% 59.41% -0.84%
- Complexity 1784 1787 +3
============================================
Files 205 213 +8
Lines 11558 12357 +799
Branches 1042 1045 +3
============================================
+ Hits 6964 7342 +378
- Misses 4187 4606 +419
- Partials 407 409 +2
📣 We’re building smart automated test selection to slash your CI/CD build times. Learn more |
client/src/main/java/org/apache/uniffle/client/impl/ShuffleWriteClientImpl.java
Outdated
Show resolved
Hide resolved
integration-test/common/src/test/java/org/apache/uniffle/test/ShuffleWithRssClientTest.java
Outdated
Show resolved
Hide resolved
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.
LGTM
for (Map.Entry<ShuffleServerInfo, List<Integer>> entry : groupedPartitions.entrySet()) { | ||
Map<Integer, List<Long>> requestBlockIds = Maps.newHashMap(); | ||
for (Integer partitionId : entry.getValue()) { | ||
requestBlockIds.put(partitionId, partitionToBlockIds.get(partitionId)); | ||
List<Long> partitions = partitionToBlockIds.get(partitionId); |
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 should be blockIds
instead of parttions
.
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.
Done
client/src/main/java/org/apache/uniffle/client/impl/ShuffleWriteClientImpl.java
Show resolved
Hide resolved
groupedPartitions.putIfAbsent(ssi, Lists.newArrayList()); | ||
} | ||
groupedPartitions.get(ssi).add(entry.getKey()); | ||
groupedPartitions.putIfAbsent(ssi, Lists.newArrayList()); |
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.
Lists.newArrayList()
will be invoked everytime.
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.
Emm.. Yes, I forget this problem for putIfAbsent
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.
Actually, the original logic is OK for me. Let me recover this part.
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.
LGTM
What changes were proposed in this pull request?
Only report to the shuffle servers that owns the blocks
Why are the changes needed?
I found some unnecessary log is shown in the shuffle server's log, like this
As shown above, there is no necessary to report 0 blocks to shuffle server for client. Let's remove this logic.
Improvement
Does this PR introduce any user-facing change?
No
How was this patch tested?