Arv*_*mar 5 apache-spark spark-submit
可以在 spark-submit 命令中指定 num-executors 覆盖已启用的动态分配 (spark.dynamicAllocation.enable true) 吗?
从日志中可以看到:
INFO util.Utils: Using initial executors = 60,
max of spark.dynamicAllocation.initialExecutors, spark.dynamicAllocation.minExecutors and spark.executor.instances
Run Code Online (Sandbox Code Playgroud)
这意味着spark将采用max(spark.dynamicAllocation.initialExecutors,spark.dynamicAllocation.minExecutors,spark.executor.instances)
Spark.executor.instances 是 --num-executor。
要显式控制执行器的数量,可以通过设置“ --num-executors”命令行或spark.executor.instances配置属性来覆盖动态分配。
" --num-executor" 的属性spark-submit与 不兼容spark.dynamicAllocation.enabled。如果同时指定了spark.dynamicAllocation.enabled和spark.executor.instances,则关闭动态分配并spark.executor.instances使用有限数量”。
此外,它还会发出警告 WARN SparkContext: Dynamic Allocation and num executors are Both set,因此动态分配被禁用。
| 归档时间: |
|
| 查看次数: |
5113 次 |
| 最近记录: |