Skip to content
Snippets Groups Projects
Commit b267175a authored by Matei Zaharia's avatar Matei Zaharia
Browse files

Synchronization fix in case SparkContext is used from multiple threads.

parent 43a33350
No related branches found
No related tags found
No related merge requests found
......@@ -152,7 +152,7 @@ private trait DAGScheduler extends Scheduler with Logging {
override def runJob[T, U](finalRdd: RDD[T], func: (TaskContext, Iterator[T]) => U,
partitions: Seq[Int], allowLocal: Boolean)
(implicit m: ClassManifest[U])
: Array[U] = {
: Array[U] = synchronized {
val outputParts = partitions.toArray
val numOutputParts: Int = partitions.size
val finalStage = newStage(finalRdd, None)
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment