首页 > 解决方案 > Spark Yarn Cluster - hive 列数大于 200 时出现 java.lang.StackOverflowError 错误

问题描述

我正在尝试使用 Apache Spark 将 250 列的 csv 文件加载到 Hive 外部表中,但我收到 StackOverflow 错误。它在 150 列上工作正常,而且比它抛出 Stackoverflow 更多。我在纱线集群模式下运行它.. 诊断:用户类抛出异常:java.lang.StackOverflowError

我尝试增加 spark.executor.extraJavaOptions 但没有运气..

您能否建议更改任何其他 jvm 设置以增加使用 250 列的堆栈大小..

关于这个问题的更多信息,

Below is detailed exception on the stackoverflow error.. I believe it is failing while trying to parse the Schema object(Array of StructFields of size 250).. at scala.util.parsing.combinator.Parsers$Parser$$anonfun$append$1.apply(Parsers.scala:254) at scala.util.parsing.combinator.Parsers$$anon$3.apply(Parsers.scala:222) at

Is there any alternative way to specify schema for long list of struct fields?

标签: apache-sparkhive

解决方案


推荐阅读