spark on yarn:Container is running beyond physical memory limits
来源:互联网 发布:淘宝分销中心在哪里 编辑:程序博客网 时间:2024/05/17 02:13
在虚拟机中安装好hadoop和spark后。执行start-all.sh(hadoop命令)来开启hdfs和yarn服务。服务开启成功后,为了测试spark on yarn的可执行性,输入命令:
./bin/spark-submit --class org.apache.spark.examples.SparkPi --master yarn --deploy-mode client ./examples/jars/spark-examples_2.11-2.1.1.jar 100
执行后我们发现该程序报错:
Application application_1447669815913_0002 failed 2 times due to AM Container for appattempt_1447669815913_0002_000002 exited with exitCode: -104 For more detailed output, check application tracking page:http://myserver.com:8088/proxy/application_1447669815913_0002/Then, click on links to logs of each attempt. Diagnostics: Container [pid=47384,containerID=container_1447669815913_0002_02_000001] is running beyond physical memory limits. Current usage: 17.9 GB of 17.5 GB physical memory used; 18.7 GB of 36.8 GB virtual memory used. Killing container.
造成这个错误的原因是虚拟机资源不足,不能创建满足要求的container。由于我们的执行是spark on yarn,所以为了提高虚拟机的内存,我们可以在hadoop的配置目录下配置yarn-site.xml. 我们在原有配置下添加如下配置:
第一个配置是虚拟机内存不足时,是否强制启动container, 设置为否,可以尽早发现内存错误<property> <name>yarn.nodemanager.vmem-check-enabled</name> <value>false</value> <description>Whether virtual memory limits will be enforced for containers</description> </property><property> <name>yarn.nodemanager.vmem-pmem-ratio</name> <value>4</value> <description>Ratio between virtual memory to physical memory when setting memory limits for containers</description></property>
第二个配置是增加虚拟机内存到物理内存的映射比例。默认为2.1.
重启服务,重新提交任务,执行成功。(一定要重启服务)
1 0
- spark on yarn:Container is running beyond physical memory limits
- yarn is running beyond physical memory limits 问题解决
- yarn is running beyond physical memory limits 问题解决
- yarn is running beyond physical memory limits 问题解决
- yarn Container beyond physical/virtual memory limits
- Spark on yarn Container beyond virtual memory limits
- running beyond physical memory limits
- Yarn运行Job报错:container is running beyond virtual memory limits
- hadoop job报错is running beyond physical memory limits
- Container is running beyond virtual memory limits. Current usage: 611.1 MB of 1 GB physical memory u
- spark-shell --master yarn-client running beyond virtual memory limits
- running beyond virtual/physical memory limits问题解决
- running beyond virtual/physical memory limits问题解决
- is running beyond virtual memory limits
- hive 执行报beyond physical memory limits
- 解决running beyond virtual memory limits. Current usage: 35.5 MB of 1 GB physical memory used; 16.8 G
- Running Spark on YARN
- Running Spark on YARN
- baidu ocr api
- Spring注解@Component、@Repository、@Service、@Controller区别
- spring实战回炉贴
- java安全架构____对称加密和非对称加密区别(对称秘钥,非对称秘钥)
- linux系统下查看 显卡 信息
- spark on yarn:Container is running beyond physical memory limits
- 动量投资(Momentum Investing)
- Html静态页面传值(中文传值不乱码)
- bzoj 3238 [Ahoi2013]差异(SAM解法)
- Java集合---HashMap源码剖析
- JDBC的使用方式
- SpringBoot部署到WAS上的问题小结
- 炒股半年亏了一辆车,以后每天好好复盘做功课吧!
- git 与远程仓库的协作(二)