Github user markhamstra commented on a diff in the pull request: https://github.com/apache/incubator-spark/pull/641#discussion_r10006949 --- Diff: core/src/main/scala/org/apache/spark/scheduler/DAGScheduler.scala --- @@ -272,8 +272,10 @@ class DAGScheduler( if (mapOutputTracker.has(shuffleDep.shuffleId)) { val serLocs = mapOutputTracker.getSerializedMapOutputStatuses(shuffleDep.shuffleId) val locs = MapOutputTracker.deserializeMapStatuses(serLocs) - for (i <- 0 until locs.size) stage.outputLocs(i) = List(locs(i)) - stage.numAvailableOutputs = locs.size + for (i <- 0 until locs.size) { + stage.outputLocs(i) = Option(locs(i)).toList // locs(i) will be null if missing --- End diff -- Yup, as long as the underlying data structure is an array of length numTasks, null is as good as any other "missing output" flag. Changing to a Map containing only valid locations instead of an array might make sense if the need to get the output statuses grows beyond the present cases in MapOutputTracker and DAGScheduler (and if the performance difference is acceptable), but now that we're handling the nulls properly in those existing cases, we're good at least for now.
--- 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. ---