This is an automated email from the ASF dual-hosted git repository.
zhouky pushed a commit to branch main
in repository https://gitbox.apache.org/repos/asf/incubator-celeborn.git
The following commit(s) were added to refs/heads/main by this push:
new ef412d593 [CELEBORN-1066] Skip looping streamimg sets in
numShuffleSteams of ChunkStreamManager
ef412d593 is described below
commit ef412d59329736019a9eaaf0ae425f2496d5a778
Author: liangbowen <[email protected]>
AuthorDate: Sun Oct 22 22:58:11 2023 +0800
[CELEBORN-1066] Skip looping streamimg sets in numShuffleSteams of
ChunkStreamManager
### What changes were proposed in this pull request?
- Minor improvement in `ChunkStreamManager.numShuffleSteams`, by replacing
`.flatMap(Set::stream).count()` to `.mapToLong(Set::size).sum()`
### Why are the changes needed?
### Does this PR introduce _any_ user-facing change?
No.
### How was this patch tested?
CI tests.
Closes #2013 from bowenliang123/numShuffleSteams.
Authored-by: liangbowen <[email protected]>
Signed-off-by: zky.zhoukeyong <[email protected]>
---
.../celeborn/service/deploy/worker/storage/ChunkStreamManager.java | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git
a/worker/src/main/java/org/apache/celeborn/service/deploy/worker/storage/ChunkStreamManager.java
b/worker/src/main/java/org/apache/celeborn/service/deploy/worker/storage/ChunkStreamManager.java
index 9de7a222f..04081c29e 100644
---
a/worker/src/main/java/org/apache/celeborn/service/deploy/worker/storage/ChunkStreamManager.java
+++
b/worker/src/main/java/org/apache/celeborn/service/deploy/worker/storage/ChunkStreamManager.java
@@ -206,6 +206,6 @@ public class ChunkStreamManager {
@VisibleForTesting
public long numShuffleSteams() {
- return shuffleStreamIds.values().stream().flatMap(Set::stream).count();
+ return shuffleStreamIds.values().stream().mapToLong(Set::size).sum();
}
}