Spark.executor.instances 超过 Spark.dynamicAllocation.enabled = True

Nab*_*rti 5 apache-spark pyspark

我正在使用 MapR 发行版的 Spark 项目工作,其中启用了动态分配。请参考以下参数:

spark.dynamicAllocation.enabled         true
spark.shuffle.service.enabled           true
spark.dynamicAllocation.minExecutors    0
spark.dynamicAllocation.maxExecutors    20
spark.executor.instances                2
Run Code Online (Sandbox Code Playgroud)

根据我的理解,spark.executor.instances 是我们在提交 pySpark 作业时定义为 --num-executors 的内容。

我有以下两个问题:

  1. 如果我--num-executors 5在作业提交期间使用它会覆盖spark.executor.instances 2配置设置吗?

  2. spark.executor.instances当动态分配最小和最大执行器已经定义时定义的目的是什么?

Cha*_*Ray 0

还有一个参数是

spark.dynamicAllocation.initialExecutors
Run Code Online (Sandbox Code Playgroud)

它需要 的​​值spark.dynamicAllocation.minExecutors。如果spark.executor.instances 定义并且它大于 minExecutors 那么它将采用初始执行器的值。