Github user kayousterhout commented on a diff in the pull request:
https://github.com/apache/spark/pull/16867#discussion_r103390199
--- Diff:
core/src/main/scala/org/apache/spark/scheduler/TaskSetManager.scala ---
@@ -911,14 +916,14 @@ private[spark] class TaskSetManager(
logDebug("Checking for speculative tasks: minFinished = " +
minFinishedForSpeculation)
if (tasksSuccessful >= minFinishedForSpeculation && tasksSuccessful >
0) {
val time = clock.getTimeMillis()
- val durations =
taskInfos.values.filter(_.successful).map(_.duration).toArray
- Arrays.sort(durations)
+ val durations = successfulTasksSet.toArray.map(taskInfos(_).duration)
val medianDuration = durations(min((0.5 *
tasksSuccessful).round.toInt, durations.length - 1))
val threshold = max(SPECULATION_MULTIPLIER * medianDuration,
minTimeToSpeculation)
// TODO: Threshold should also look at standard deviation of task
durations and have a lower
// bound based on that.
logDebug("Task length threshold for speculation: " + threshold)
- for ((tid, info) <- taskInfos) {
+ for (tid <- runningTasksSet) {
+ val info = taskInfos(tid)
--- End diff --
Echoing what Imran said -- I'm definitely +1 on merging this simple change.
The other changes in this PR add a bunch of complexity, so I'd need to see
measurements demonstrating a significant improvement in performance to be
convinced that we should merge them.
---
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]