我的火花作业是使用Mllib训练数据的LogisticRegression,但由于Stackoverflow错误而失败,这里是spark-shell中显示的错误消息
java.lang.StackOverflowError
at scala.collection.generic.Growable$$anonfun$$plus$plus$eq$1.apply(Growable.scala:48)
at scala.collection.generic.Growable$$anonfun$$plus$plus$eq$1.apply(Growable.scala:48)
at scala.collection.IndexedSeqOptimized$class.foreach(IndexedSeqOptimized.scala:33)
at scala.collection.mutable.WrappedArray.foreach(WrappedArray.scala:34)
at scala.collection.generic.Growable$class.$plus$plus$eq(Growable.scala:48)
at scala.collection.mutable.ListBuffer.$plus$plus$eq(ListBuffer.scala:176)
at scala.collection.mutable.ListBuffer.$plus$plus$eq(ListBuffer.scala:45)
at scala.collection.generic.GenericCompanion.apply(GenericCompanion.scala:48)
...
当我检查Spark UI时,没有失败的阶段或工作!这就是我运行spark-shell的方式
spark-shell --num-executors 100 --driver-memory 20g --conf spark.driver.maxResultSize=5g --executor-memory 8g --executor-cores 3
我甚至试图通过在运行spark-shell时添加以下行来增加堆栈的大小,但它没有帮助
--conf "spark.driver.extraJavaOptions='-XX:ThreadStackSize=81920'"
问题是什么?