美文网首页
Spark3.1.1 ERROR AsyncEventQueu

Spark3.1.1 ERROR AsyncEventQueu

作者: 雅阁驸马 | 来源:发表于2021-07-09 08:37 被阅读0次

    Spark 3.1.1 运行job的时候报错如下:

    21/03/12 18:16:44 ERROR AsyncEventQueue: Listener EventLoggingListener threw an exception
    java.util.ConcurrentModificationException
        at java.util.Hashtable$Enumerator.next(Hashtable.java:1387)
        at scala.collection.convert.Wrappers$JPropertiesWrapper$$anon$6.next(Wrappers.scala:424)
        at scala.collection.convert.Wrappers$JPropertiesWrapper$$anon$6.next(Wrappers.scala:420)
        at scala.collection.Iterator.foreach(Iterator.scala:941)
        at scala.collection.Iterator.foreach$(Iterator.scala:941)
        at scala.collection.AbstractIterator.foreach(Iterator.scala:1429)
        at scala.collection.IterableLike.foreach(IterableLike.scala:74)
        at scala.collection.IterableLike.foreach$(IterableLike.scala:73)
        at scala.collection.AbstractIterable.foreach(Iterable.scala:56)
        at scala.collection.mutable.MapLike.toSeq(MapLike.scala:75)
        at scala.collection.mutable.MapLike.toSeq$(MapLike.scala:72)
        at scala.collection.mutable.AbstractMap.toSeq(Map.scala:82)
        at org.apache.spark.scheduler.EventLoggingListener.redactProperties(EventLoggingListener.scala:290)
        at org.apache.spark.scheduler.EventLoggingListener.onJobStart(EventLoggingListener.scala:162)
        at org.apache.spark.scheduler.SparkListenerBus.doPostEvent(SparkListenerBus.scala:37)
        at org.apache.spark.scheduler.SparkListenerBus.doPostEvent$(SparkListenerBus.scala:28)
        at org.apache.spark.scheduler.AsyncEventQueue.doPostEvent(AsyncEventQueue.scala:37)
        at org.apache.spark.scheduler.AsyncEventQueue.doPostEvent(AsyncEventQueue.scala:37)
        at org.apache.spark.util.ListenerBus.postToAll(ListenerBus.scala:117)
        at org.apache.spark.util.ListenerBus.postToAll$(ListenerBus.scala:101)
        at org.apache.spark.scheduler.AsyncEventQueue.super$postToAll(AsyncEventQueue.scala:105)
        at org.apache.spark.scheduler.AsyncEventQueue.$anonfun$dispatch$1(AsyncEventQueue.scala:105)
        at scala.runtime.java8.JFunction0$mcJ$sp.apply(JFunction0$mcJ$sp.java:23)
        at scala.util.DynamicVariable.withValue(DynamicVariable.scala:62)
        at org.apache.spark.scheduler.AsyncEventQueue.org$apache$spark$scheduler$AsyncEventQueue$$dispatch(AsyncEventQueue.scala:100)
        at org.apache.spark.scheduler.AsyncEventQueue$$anon$2.$anonfun$run$1(AsyncEventQueue.scala:96)
        at org.apache.spark.util.Utils$.tryOrStopSparkContext(Utils.scala:1379)
        at org.apache.spark.scheduler.AsyncEventQueue$$anon$2.run(AsyncEventQueue.scala:96)
    

    这个问题是spark自身的bug,在spark 3.1.2和spark 3.2.0已经修复了。如果你现在不方便升级spark版本,请在spark-defaults.conf中加入如下配置也可以规避:

    spark.eventLog.enable=false
    

    详情见:https://issues.apache.org/jira/browse/SPARK-34731

    相关文章

      网友评论

          本文标题:Spark3.1.1 ERROR AsyncEventQueu

          本文链接:https://www.haomeiwen.com/subject/eunxpltx.html