spark执行在yarn上executor内存不足异常ERROR YarnScheduler: Lost executor 542 on host-bigdata3: Container marked as failed: container_e40_1550646084627_1007653_01_000546 on host: host-bigdata3. Exit status: 143.

 

当spark跑在yarn上时 单个executor执行时,数据量过大时会导致executor的memory不足而使得rdd  最后lost,最终导致任务执行失败

 

其中会抛出如图异常信息

 

如图中异常所示

 

对应解决方法可以加上对应的参数调优(这个配置可以在总的处理数据量在几百TB或者1~3PB级别的数据处理时解决executor-memory不足问题)

 --num-executors=512 --executor-cores=8 --executor-memory=32g --driver-memory=16g --driver-cores=8g --shuffle_partitions=4000 

 

以上设置的相关数值,可以根据实际集群大小适当调整;但是如果遇到类似异常问题大多就是调整这几个参数就可以解决

 

posted @ 2019-02-28 14:23  新际航  阅读(3558)  评论(0编辑  收藏  举报