![](/img/trans.png)
[英]How to change Spark setting to allow spark.dynamicAllocation.enabled?
[英]spark.executor.instances over spark.dynamicAllocation.enabled = True
我正在使用啟用動態分配的MapR分布在Spark項目中工作。 請參考以下參數:
spark.dynamicAllocation.enabled true
spark.shuffle.service.enabled true
spark.dynamicAllocation.minExecutors 0
spark.dynamicAllocation.maxExecutors 20
spark.executor.instances 2
根據我的理解,spark.executor.instances在提交pySpark作業時被定義為--num-executors。
我有以下兩個問題:
如果我在提交工作期間使用--num-executors 5
,它將覆蓋spark.executor.instances 2
配置設置嗎?
當已經定義了動態分配的最小和最大執行程序時,定義spark.executor.instances
的目的是什么?
還有一個參數是
spark.dynamicAllocation.initialExecutors
它采用spark.dynamicAllocation.minExecutors
的值。 如果spark.executor.instances
被定義並且其比minExecutors較大那么將采取初始執行人的值。
spark.executor.instances
基本上是靜態分配的屬性。 但是,如果啟用了動態分配,則執行程序的初始集合將至少等於spark.executor.instances
。
當您設置--num-executors時,它不會在配置設置中被覆蓋。
附加閱讀: 官方文檔
聲明:本站的技術帖子網頁,遵循CC BY-SA 4.0協議,如果您需要轉載,請注明本站網址或者原文地址。任何問題請咨詢:yoyou2525@163.com.