Github user kayousterhout commented on a diff in the pull request: https://github.com/apache/spark/pull/1313#discussion_r15016112 --- Diff: core/src/main/scala/org/apache/spark/scheduler/TaskSetManager.scala --- @@ -353,6 +350,14 @@ private[spark] class TaskSetManager( for (index <- findTaskFromList(execId, getPendingTasksForHost(host))) { return Some((index, TaskLocality.NODE_LOCAL, false)) } + // Look for noPref tasks after NODE_LOCAL for minimize cross-rack traffic + for (index <- findTaskFromList(execId, pendingTasksWithNoPrefs)) { + return Some((index, TaskLocality.PROCESS_LOCAL, false)) + } + // find a speculative task if all noPref tasks have been scheduled + val specTask = findSpeculativeTask(execId, host, locality).map { + case (taskIndex, allowedLocality) => (taskIndex, allowedLocality, true)} + if (specTask != None) return specTask --- End diff -- What happens if the maximum current allowed locality level (based on delay scheduling) is PROCESS_LOCAL? It seems like that will mean tasks in pendingTasksWithNoPrefs can't be scheduled (they won't be scheduled until the first timeout expires) -- which seems bad?
--- 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. ---