Github user kayousterhout commented on a diff in the pull request:
https://github.com/apache/spark/pull/9175#discussion_r42568601
--- Diff: core/src/main/scala/org/apache/spark/scheduler/DAGScheduler.scala
---
@@ -353,10 +353,15 @@ class DAGScheduler(
if (mapOutputTracker.containsShuffle(shuffleDep.shuffleId)) {
val serLocs =
mapOutputTracker.getSerializedMapOutputStatuses(shuffleDep.shuffleId)
val locs = MapOutputTracker.deserializeMapStatuses(serLocs)
- for (i <- 0 until locs.length) {
- stage.outputLocs(i) = Option(locs(i)).toList // locs(i) will be
null if missing
+ var numAvailableOutputs = 0
+ var i = 0
+ while (i < locs.length) {
+ if (locs(i) ne null) {
+ // locs(i) will be null if missing
+ stage.addOutputLoc(i, locs(i))
--- End diff --
Why not do the locs.foreach { ... here?
---
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]