运行Spark GraphX Pregel出现Issue communicating with driver in heartbeater异常

最近基于Spark GraphX Pregel开发了一个ETL任务,运行过程中会报Issue communicating with driver in heartbeater,然后就是Connection refused错误。

经分析,Spark GraphX Pregel在每次迭代都会产生新的job, 如果迭代的次数多,会产生大量的job, driver会被阻塞造成通讯失败,任务中断。

解决办法:调整driver-memory参数。

spark.driver.memory1gAmount of memory to use for the driver process, i.e. where SparkContext is initialized, in the same format as JVM memory strings with a size unit suffix ("k", "m", "g" or "t") (e.g. 512m2g). 
Note: In client mode, this config must not be set through the SparkConf directly in your application, because the driver JVM has already started at that point. Instead, please set this through the --driver-memory command line option or in your default properties file.
1.1.1

driver-memory默认是1G,将参数调整到32G,任务正常结束。

但是如果数据非常大,这个不是最优解决方案,因为AM的内存分配是有上限的,上限值由配置项 yarn.scheduler.maximum-allocation-mb控制。

其它配置参数:

--num-executors:如果job很多,可考虑调大此参数,增加并行度,能降低运行时间,一般20-50

--executor-memory: 如果job的stage很多,可以调大此参数,默认1G,生产环境4G

  • 0
    点赞
  • 6
    收藏
    觉得还不错? 一键收藏
  • 1
    评论
评论 1
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值