[ambari hdp]YarnSchedulerBackend$YarnSchedulerEndpoint: Container marked as failed

最近在使用ambari hdp 2.6.3版本,过程中提交spark程序时报如下错误:

YarnSchedulerBackend$YarnSchedulerEndpoint: Container marked as failed exit code 1

看了官方的解释,链接如下,大概意思是说你在提交spark任务时的contanier的内存总大小(每个excutor个数乘上每个excutor的内存),超过了在ambari yarn中配置的container的总大小。

https://community.hortonworks.com/questions/42782/container-marked-as-failed-spark-yarn.html

 

我的集群配置如下:

[ambari hdp]YarnSchedulerBackend$YarnSchedulerEndpoint: Container marked as failed

spark 任务提交时的配置如下:

[ambari hdp]YarnSchedulerBackend$YarnSchedulerEndpoint: Container marked as failed

尽量减少executor的数量和增加每个excutor的内存,开始的时候我的executor的个数是3,每个executor的内存是500M,后来

修改executor的个数为1,每个executor的内存为800M就ok了,根据经验这个错误的出现也有可能是executor的内存台太小而任务需要的内存比较大,此时相应的将executor的内存设置的大些,就可以成功了运行任务,希望能对你有帮助,同时作为一次小计,供以后查阅。