Github user CodingCat commented on a diff in the pull request: https://github.com/apache/spark/pull/1313#discussion_r14590330 --- Diff: core/src/main/scala/org/apache/spark/scheduler/TaskSetManager.scala --- @@ -362,21 +363,25 @@ private[spark] class TaskSetManager( } } - // Look for no-pref tasks after rack-local tasks since they can run anywhere. - for (index <- findTaskFromList(execId, pendingTasksWithNoPrefs)) { - return Some((index, TaskLocality.PROCESS_LOCAL, false)) - } - - if (TaskLocality.isAllowed(locality, TaskLocality.ANY)) { - for (index <- findTaskFromList(execId, allPendingTasks)) { + if (locality == maxAllowedLocality) { + // Look for no-pref tasks after rack-local tasks since they can run anywhere. + for (index <- findTaskFromList(execId, pendingTasksWithNoPrefs)) { --- End diff -- en....I'm not sure about this, running no-pref after rack-local has been here for a long while...why we want to run no pref before rack local?
--- 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 infrastruct...@apache.org or file a JIRA ticket with INFRA. ---