@@ -694,18 +694,21 @@ class DAGScheduler(
694694 // Get our pending tasks and remember them in our pendingTasks entry
695695 stage.pendingTasks.clear()
696696 var tasks = ArrayBuffer [Task [_]]()
697+ val broadcastRddBinary = stage.rdd.createBroadcastBinary()
697698 if (stage.isShuffleMap) {
698699 for (p <- 0 until stage.numPartitions if stage.outputLocs(p) == Nil ) {
699700 val locs = getPreferredLocs(stage.rdd, p)
700- tasks += new ShuffleMapTask (stage.id, stage.rdd, stage.shuffleDep.get, p, locs)
701+ val part = stage.rdd.partitions(p)
702+ tasks += new ShuffleMapTask (stage.id, broadcastRddBinary, stage.shuffleDep.get, part, locs)
701703 }
702704 } else {
703705 // This is a final stage; figure out its job's missing partitions
704706 val job = stage.resultOfJob.get
705707 for (id <- 0 until job.numPartitions if ! job.finished(id)) {
706- val partition = job.partitions(id)
707- val locs = getPreferredLocs(stage.rdd, partition)
708- tasks += new ResultTask (stage.id, stage.rdd, job.func, partition, locs, id)
708+ val p : Int = job.partitions(id)
709+ val part = stage.rdd.partitions(p)
710+ val locs = getPreferredLocs(stage.rdd, p)
711+ tasks += new ResultTask (stage.id, broadcastRddBinary, job.func, part, locs, id)
709712 }
710713 }
711714
0 commit comments