Apache spark 在纱线上使用火花时,maxExecutors、num executors和initialExecutors之间的关系是什么?
首先,我读到,Apache spark 在纱线上使用火花时,maxExecutors、num executors和initialExecutors之间的关系是什么?,apache-spark,yarn,Apache Spark,Yarn,首先,我读到,spark.dynamicAllocation.maxecutors的值将等于num executors,如果spark.dynamicAllocation.maxecutors没有显式设置。但是,在本文的以下部分中,它说“--num executors或spark.executor.instances作为默认值为2的最小执行者数量”,这让我感到困惑 我的第一个问题是--num executors在Spark 2.x或更高版本中的用法是什么?在动态定位之前,它是否像一个过时的选项一
spark.dynamicAllocation.maxecutors
的值将等于num executors
,如果spark.dynamicAllocation.maxecutors
没有显式设置。但是,在本文的以下部分中,它说“--num executors
或spark.executor.instances
作为默认值为2的最小执行者数量”,这让我感到困惑
--num executors
在Spark 2.x或更高版本中的用法是什么?在动态定位之前,它是否像一个过时的选项一样有用?当引入DynamicLocation时,--num executors
和--max executors
的行为更像是spark.DynamicLocation.
的一些默认值
--conf spark.dynamicAllocation.maxecutors
和--max executor
之间有什么区别?后者是前者的别名吗
numexecutors
和spark.dynamicAllocation.initialExecutors
之间的关系。因此,我做了一个实验,其中我发送了以下参数:
--conf spark.dynamicAllocation.minExecutors=2 --conf spark.dynamicAllocation.maxExecutors=20 --conf spark.dynamicAllocation.enabled=true --conf spark.dynamicAllocation.initialExecutors=3 --conf spark.dynamicAllocation.maxExecutors=10 --num-executors 0 --driver-memory 1g --executor-memory 1g --executor-cores 2
结果是,最初分配了3个执行器(对应于初始执行器
),然后减少到2个(对应于地雷执行器
),并且似乎--num executors
在这里是无用的。然而,文章说“-num executors或spark.executor.instances作为最小数量的执行者”,所以现在存在一个矛盾
num executors
和spark.dynamicAllocation.initialExecutors
之间的关系,是spark.dynamicAllocation.initialExecutors
之前的num executors
?从中,我发现当num executors
设置为大于spark.dynamicalocation.initialExecutors
时,它将覆盖spark.dynamicalocation.initialExecutors