Github user srowen commented on a diff in the pull request:
https://github.com/apache/spark/pull/11719#discussion_r56150936
--- Diff:
core/src/main/scala/org/apache/spark/scheduler/TaskSetManager.scala ---
@@ -543,21 +543,22 @@ private[spark] class TaskSetManager(
case TaskLocality.NO_PREF => pendingTasksWithNoPrefs.nonEmpty
case TaskLocality.RACK_LOCAL =>
moreTasksToRunIn(pendingTasksForRack)
}
+ val previousLocalityIndex = currentLocalityIndex
if (!moreTasks) {
// This is a performance optimization: if there are no more tasks
that can
// be scheduled at a particular locality level, there is no point
in waiting
// for the locality wait timeout (SPARK-4939).
lastLaunchTime = curTime
- logDebug(s"No tasks for locality level
${myLocalityLevels(currentLocalityIndex)}, " +
- s"so moving to locality level
${myLocalityLevels(currentLocalityIndex + 1)}")
currentLocalityIndex += 1
+ logDebug(s"No tasks for locality level
${myLocalityLevels(previousLocalityIndex)}, " +
+ s"so moving to locality level
${myLocalityLevels(currentLocalityIndex)}")
} else if (curTime - lastLaunchTime >=
localityWaits(currentLocalityIndex)) {
// Jump to the next locality level, and reset lastLaunchTime so
that the next locality
// wait timer doesn't immediately expire
lastLaunchTime += localityWaits(currentLocalityIndex)
currentLocalityIndex += 1
logDebug(s"Moving to ${myLocalityLevels(currentLocalityIndex)}
after waiting for " +
- s"${localityWaits(currentLocalityIndex)}ms")
+ s"${localityWaits(previousLocalityIndex)}ms")
--- End diff --
Ah OK, not quite what I meant. But, how about a slightly different idea. To
match how the debug statement above works, leave it as-is, but then make this
one:
```
logDebug(s"Moving to ${myLocalityLevels(currentLocalityIndex)} after
waiting for " +
s"${localityWaits(currentLocalityIndex+1)}ms")
currentLocalityIndex += 1
```
---
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]