-
- Downloads
[SPARK-5785] [PySpark] narrow dependency for cogroup/join in PySpark
Currently, PySpark does not support narrow dependency during cogroup/join when the two RDDs have the partitioner, another unnecessary shuffle stage will come in. The Python implementation of cogroup/join is different than Scala one, it depends on union() and partitionBy(). This patch will try to use PartitionerAwareUnionRDD() in union(), when all the RDDs have the same partitioner. It also fix `reservePartitioner` in all the map() or mapPartitions(), then partitionBy() can skip the unnecessary shuffle stage. Author: Davies Liu <davies@databricks.com> Closes #4629 from davies/narrow and squashes the following commits: dffe34e [Davies Liu] improve test, check number of stages for join/cogroup 1ed3ba2 [Davies Liu] Merge branch 'master' of github.com:apache/spark into narrow 4d29932 [Davies Liu] address comment cc28d97 [Davies Liu] add unit tests 940245e [Davies Liu] address comments ff5a0a6 [Davies Liu] skip the partitionBy() on Python side eb26c62 [Davies Liu] narrow dependency in PySpark
Showing
- core/src/main/scala/org/apache/spark/SparkContext.scala 9 additions, 2 deletionscore/src/main/scala/org/apache/spark/SparkContext.scala
- core/src/main/scala/org/apache/spark/api/python/PythonRDD.scala 10 additions, 0 deletions...rc/main/scala/org/apache/spark/api/python/PythonRDD.scala
- core/src/main/scala/org/apache/spark/rdd/RDD.scala 7 additions, 1 deletioncore/src/main/scala/org/apache/spark/rdd/RDD.scala
- python/pyspark/join.py 4 additions, 4 deletionspython/pyspark/join.py
- python/pyspark/rdd.py 33 additions, 16 deletionspython/pyspark/rdd.py
- python/pyspark/streaming/dstream.py 1 addition, 1 deletionpython/pyspark/streaming/dstream.py
- python/pyspark/tests.py 37 additions, 1 deletionpython/pyspark/tests.py
Loading
Please register or sign in to comment