-
Notifications
You must be signed in to change notification settings - Fork 28.9k
[SPARK-32055][CORE][SQL] Unify getReader and getReaderForRange in ShuffleManager #28895
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
Conversation
|
Test build #124368 has finished for PR 28895 at commit
|
| def getMapSizesByExecutorId(shuffleId: Int, reduceId: Int) | ||
| : Iterator[(BlockManagerId, Seq[(BlockId, Long, Int)])] = { | ||
| getMapSizesByExecutorId(shuffleId, reduceId, reduceId + 1) | ||
| getMapSizesByExecutorId(shuffleId, mapStatus => (0, mapStatus.length), reduceId, reduceId + 1) |
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.
Since mapStatus => (0, mapStatus.length) seems to be used frequently, do you think we can define this function somewhere to prevent mistakes?
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.
yes, sounds good.
|
@JkSelf @cloud-fan Could you please take a look? Thanks! |
|
Test build #124376 has finished for PR 28895 at commit
|
|
Jenkins, retest this please. |
|
Test build #124377 has finished for PR 28895 at commit
|
|
Jenkins, retest this please. |
core/src/main/scala/org/apache/spark/shuffle/ShuffleManager.scala
Outdated
Show resolved
Hide resolved
| handle: ShuffleHandle, | ||
| startMapIndex: Int, | ||
| endMapIndex: Int, | ||
| mapIndexRange: Array[MapStatus] => (Int, Int), |
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.
Same with the parameters of startPartition and endPartition, here we can remain the startMapIndex and endMapIndex in getReader method. It will be more clearly.
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.
The problem is we can not know the endMapIndex at the caller side. Maybe we could try @cloud-fan 's suggestion above.
|
Test build #124380 has finished for PR 28895 at commit
|
|
Test build #124393 has finished for PR 28895 at commit
|
|
Test build #124411 has finished for PR 28895 at commit
|
|
Test build #124419 has finished for PR 28895 at commit
|
|
Test build #124464 has finished for PR 28895 at commit
|
|
retest this please. |
|
Test build #124465 has finished for PR 28895 at commit
|
|
retest this please |
|
Test build #124487 has finished for PR 28895 at commit
|
|
retest this please |
|
Test build #124494 has finished for PR 28895 at commit
|
|
Retest this please. |
|
Test build #124555 has finished for PR 28895 at commit
|
|
retest this please |
|
Test build #5048 has finished for PR 28895 at commit
|
|
retest this please |
|
Test build #124623 has finished for PR 28895 at commit
|
|
thanks, merging to master! |
|
+1, late LGTM. Thank you, @Ngone51 and @cloud-fan . |
|
Test build #124630 has finished for PR 28895 at commit
|
|
thanks all! |
…ffleManager ### What changes were proposed in this pull request? This PR tries to unify the method `getReader` and `getReaderForRange` in `ShuffleManager`. ### Why are the changes needed? Reduce the duplicate codes, simplify the implementation, and for better maintenance. ### Does this PR introduce _any_ user-facing change? No. ### How was this patch tested? Covered by existing tests. Closes #28895 from Ngone51/unify-getreader. Authored-by: yi.wu <[email protected]> Signed-off-by: Wenchen Fan <[email protected]>
What changes were proposed in this pull request?
This PR tries to unify the method
getReaderandgetReaderForRangeinShuffleManager.Why are the changes needed?
Reduce the duplicate codes, simplify the implementation, and for better maintenance.
Does this PR introduce any user-facing change?
No.
How was this patch tested?
Covered by existing tests.