Github user markhamstra commented on a diff in the pull request: https://github.com/apache/incubator-spark/pull/641#discussion_r9996859 --- 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 -- Ok, it was a bad assumption on my part that the mapOutputTracker would only be returning valid locations, and this PR does address the possibility of null values here. However, it feels to me like it is addressing the symptom instead of the cause. Wouldn't we be better off either not putting nulls into the MapOutputTracker in the first place, or at least not returning them when getting map output statuses? As it stands, null checks are probably needed everywhere the output statuses are fetched.
--- 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. ---