apache/spark — pull request #3291 by mengxr (2014-11-16 04:43:56+00:00)
Title: [SPARK-4433] fix a racing condition in zipWithIndex

Spark hangs with the following code:

~~~
sc.parallelize(1 to 10).zipWithIndex.repartition(10).count()
~~~

This is because ZippedWithIndexRDD triggers a job in getPartitions and it causes a deadlock in DAGScheduler.getPreferredLocs (synced).

This should be applied to branch-1.0, branch-1.1, and branch-1.2.