Github user kayousterhout commented on a diff in the pull request:
https://github.com/apache/spark/pull/14871#discussion_r76713033
--- Diff:
core/src/main/scala/org/apache/spark/scheduler/TaskSchedulerImpl.scala ---
@@ -326,12 +323,19 @@ private[spark] class TaskSchedulerImpl(
// Take each TaskSet in our scheduling order, and then offer it each
node in increasing order
// of locality levels so that it gets a chance to launch local tasks
on all of them.
// NOTE: the preferredLocality order: PROCESS_LOCAL, NODE_LOCAL,
NO_PREF, RACK_LOCAL, ANY
- var launchedTask = false
- for (taskSet <- sortedTaskSets; maxLocality <-
taskSet.myLocalityLevels) {
- do {
- launchedTask = resourceOfferSingleTaskSet(
+ for (taskSet <- sortedTaskSets) {
+ var launchedAnyTask = false
+ var launchedTaskAtMaxLocality = false
--- End diff --
I know it's super verbose, but to minimize how confusing this code is, what
about calling this launchedTaskAtCurrentMaxLocality, and renaming maxLocality
below to currentMaxLocality?
---
If your project is set up for it, you can reply to this email and have your
reply appear on GitHub as well. If your project does not have this feature
enabled and wishes so, or if the feature is enabled but not working, please
contact infrastructure at [email protected] or file a JIRA ticket
with INFRA.
---
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]