在我们使用sparkStreaming执行的时候,出现的问题,偶尔会出现Stager停止不动的现象。
但是我们点击任务进去的时候!发现任务状态SUCCESSED的。
然后我们去查看日志,发现日志中出现ERROR和WARN报出:
ERROR LiveListenerBus: Dropping SparkListenerEvent because no remaining room in event queue. This likely means one of the SparkListeners is too slow and cannot keep up with the rate at which tasks are being started by the scheduler.
WARN LiveListenerBus: Dropped 1 SparkListenerEvents since Thu Jan 01 08:00:00 CST 1970
分析问题的原因:
当消息队列中的消息数超过其spark.scheduler.listenerbus.eventqueue.size设置的数量(如果没有设置,默认为10000)时,会将最新的消息移除,这些消息本来是通知任务运行状态的,由于你移除了,状态无法得到更新,所以会出现上面描述的现象。
解决方案:
在spark-submit中添加参数。
--conf spark.scheduler.listenerbus.eventqueue.size=100000