Uli*_*hke 17 apache-spark apache-spark-sql
Spark用于计算减少任务数量的公式是什么?
我正在运行几个spark-sql查询,reduce任务的数量总是200.这些查询的map任务数量是154.我在Spark 1.4.1上.
这与spark.shuffle.sort.bypassMergeThreshold有关,默认为200
sgv*_*gvd 25
这spark.sql.shuffle.partitions就是你要追求的.根据Spark SQL编程指南:
spark.sql.shuffle.partitions 200 Configures the number of partitions to use when shuffling data for joins or aggregations.
Run Code Online (Sandbox Code Playgroud)
另一个相关的选项是spark.default.parallelism,它决定了'不是由用户'设置的转换返回的RDD中的默认分区数,例如join,reduceByKey和parallelize,但是这似乎被Spark SQL忽略,只有在平原上工作时才有意义RDDS.
| 归档时间: |
|
| 查看次数: |
15664 次 |
| 最近记录: |