-
Notifications
You must be signed in to change notification settings - Fork 29k
[SPARK-23496][CORE] Locality of coalesced partitions can be severely skewed by the order of input partitions #20664
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
Changes from 1 commit
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
- Loading branch information
There are no files selected for viewing
| Original file line number | Diff line number | Diff line change |
|---|---|---|
|
|
@@ -1152,9 +1152,8 @@ class RDDSuite extends SparkFunSuite with SharedSparkContext { | |
| .groupBy(identity) | ||
| .mapValues(_.size) | ||
|
|
||
| // Without the fix these would be: | ||
| // numPartsPerLocation(locations(0)) == numCoalescedPartitions - 1 | ||
| // numPartsPerLocation(locations(1)) == 1 | ||
| // Make sure the coalesced partitions are distributed fairly evenly between the two locations. | ||
| // This should not become flaky since the DefaultPartitionsCoalescer uses a fixed seed. | ||
| assert(numPartsPerLocation(locations(0)) > 0.4 * numCoalescedPartitions) | ||
|
Contributor
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. How confident are we on the assert condition to be true? How is the fraction
Contributor
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. nvm, the result is deterministic.
Contributor
Author
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Added comment about flakiness & fixed seed. |
||
| assert(numPartsPerLocation(locations(1)) > 0.4 * numCoalescedPartitions) | ||
| } | ||
|
|
||
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.
Perhaps add comment to explain the purpose of this change here?