-
Notifications
You must be signed in to change notification settings - Fork 29.3k
[SPARK-31837][CORE] Shift to the new highest locality level if there is when recomputeLocality #28656
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
[SPARK-31837][CORE] Shift to the new highest locality level if there is when recomputeLocality #28656
Changes from 4 commits
d02bc04
8c333e1
c742666
312700a
0773806
cb51bb4
8744f1e
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
| Original file line number | Diff line number | Diff line change |
|---|---|---|
|
|
@@ -1107,10 +1107,16 @@ private[spark] class TaskSetManager( | |
| def recomputeLocality(): Unit = { | ||
| // A zombie TaskSetManager may reach here while executorLost happens | ||
| if (isZombie) return | ||
| val previousLocalityIndex = currentLocalityIndex | ||
| val previousLocalityLevel = myLocalityLevels(currentLocalityIndex) | ||
| myLocalityLevels = computeValidLocalityLevels() | ||
| localityWaits = myLocalityLevels.map(getLocalityWait) | ||
| currentLocalityIndex = getLocalityIndex(previousLocalityLevel) | ||
| if (currentLocalityIndex > previousLocalityIndex) { | ||
| // SPARK-31837: there's new higher locality level, so shift to | ||
|
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 about |
||
| // the highest locality level in terms of better data locality | ||
| currentLocalityIndex = 0 | ||
|
Member
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. My only concern of this change is, for general cases, whether the task set would take more time on delay scheduling and thus reduce the throughput of the cluster. But considering the improvement that we gain(to increase the throughput of the cluster) from the new version of the delay scheduling, I think it should not be a big problem.
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. I have concerns with this. This is going to reset it back to highest level all the time and then you will have to work your way back through the levels, waiting at each level. This could really delay things a lot if you are down to the ANY level and you have to wait 3 seconds between each one. The problem you are describing is only on startup when you have no executors, correct? Perhaps we can look at something more specific for that. |
||
| } | ||
| } | ||
|
|
||
| def executorAdded(): Unit = { | ||
|
|
||
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.
I think we should change this to only happen when executorAdded. this is also called on lost and decommission and it doesn't make sense to go to "lower" level. Note we may want to stay away from saying higher in the comment below. The code values, lower is actually more strict - meaning process is lowest value. so perhaps don't say higher or lower but say more local or less local. Perhaps pass in parameter from executorAdded.
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.
I think it's impossible to go to "lower" or more local level in case of lost and decommission. Lost and decommission would remove executors, so the locality levels can only be less compared to the previous locality levels. It also means, lost and decommission will not add new more local levels.
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.
Yea, good point!