简体   繁体   English

更改执行器的最小堆大小以产生火花

[英]Change minimum heap size of executor in spark on yarn

I want to change the initial/minimum heap size of my executors while running spark on yarn. 我想在纱线上运行火花时更改执行程序的初始/最小堆大小。 Right now it throws the following exception, 现在,它引发以下异常,

java.lang.Exception: spark.executor.extraJavaOptions is not allowed to alter memory settings java.lang.Exception:不允许spark.executor.extraJavaOptions更改内存设置

I am using the following --conf "spark.executor.extraJavaOptions=-Xms4096m" while running my spark-shell. 在运行我的spark-shell时,我正在使用以下--conf "spark.executor.extraJavaOptions=-Xms4096m"

I am using spark 1.6.0. 我正在使用spark 1.6.0。 Greatly appreciate the help! 非常感谢您的帮助!

A bit about spark.executor.extraJavaOptions from the docs 有关文档中的 spark.executor.extraJavaOptions的一些知识

Note that it is illegal to set Spark properties or heap size settings with this option. 请注意,使用此选项设置Spark属性或堆大小设置是非法的。 Spark properties should be set using a SparkConf object or the spark-defaults.conf file used with the spark-submit script. 应该使用SparkConf对象或与spark-submit脚本一起使用的spark-defaults.conf文件设置Spark属性。 Heap size settings can be set with spark.executor.memory. 堆大小设置可以通过spark.executor.memory进行设置。

Try this --conf "spark.executor.memory=4g" 试试这个--conf "spark.executor.memory=4g"

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM