diff options
author | Matei Zaharia <matei@eecs.berkeley.edu> | 2011-06-27 22:50:43 -0700 |
---|---|---|
committer | Matei Zaharia <matei@eecs.berkeley.edu> | 2011-06-27 22:50:43 -0700 |
commit | b0ecf1ee41f2280a885a8005363e0d0b197e4d3b (patch) | |
tree | 4163e13172098386a408d4cdc1488ffb9d562531 /core | |
parent | 2f652f1656655e6966e3631de9ff2e783b51afef (diff) | |
download | spark-b0ecf1ee41f2280a885a8005363e0d0b197e4d3b.tar.gz spark-b0ecf1ee41f2280a885a8005363e0d0b197e4d3b.tar.bz2 spark-b0ecf1ee41f2280a885a8005363e0d0b197e4d3b.zip |
Don't pass a null context when running tasks locally
Diffstat (limited to 'core')
-rw-r--r-- | core/src/main/scala/spark/DAGScheduler.scala | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/core/src/main/scala/spark/DAGScheduler.scala b/core/src/main/scala/spark/DAGScheduler.scala index 99a69203af..ecdce037e9 100644 --- a/core/src/main/scala/spark/DAGScheduler.scala +++ b/core/src/main/scala/spark/DAGScheduler.scala @@ -171,7 +171,8 @@ private trait DAGScheduler extends Scheduler with Logging { if (finalStage.parents.size == 0 && numOutputParts == 1) { logInfo("Computing the requested partition locally") val split = finalRdd.splits(outputParts(0)) - return Array(func(null, finalRdd.iterator(split))) + val taskContext = new TaskContext(finalStage.id, outputParts(0), 0) + return Array(func(taskContext, finalRdd.iterator(split))) } def submitStage(stage: Stage) { |