Spark SQL 作业的 Spark 修复任务编号 [英] Spark fix task number for Spark SQL jobs

查看:26
本文介绍了Spark SQL 作业的 Spark 修复任务编号的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我一直看到 Apache Spark 安排了一系列阶段,其中涉及固定的 200 个任务.由于这种情况不断发生在许多不同的工作中,我猜这与 Spark 配置之一有关.有什么建议可能是这种配置吗?

I keep seeing that Apache Spark schedules series of stages with a fixed 200 tasks involved. Since this keeps happening to a number of different jobs I am guessing this is somehow related to one of Spark configurations. Any suggestion what that configuration might be?

推荐答案

200 是 shuffle 期间使用的默认分区数,它由 spark.sql.shuffle.partitions 控制.它的值可以在运行时使用 SQLContext.setConf 设置:

200 is a default number of partitions used during shuffles and it is controlled by spark.sql.shuffle.partitions. Its value can set on runtime using SQLContext.setConf:

sqlContext.setConf("spark.sql.shuffle.partitions", "42")

RuntimeConfig.set

spark.conf.set("spark.sql.shuffle.partitions", 42)

这篇关于Spark SQL 作业的 Spark 修复任务编号的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆