天天看点

spark提交maven程序报错Exception in thread “main“ java.lang.StackOverflowError报错Exception in thread “main” java.lang.StackOverflowError解决方案:

报错Exception in thread “main” java.lang.StackOverflowError

如下:

spark提交maven程序报错Exception in thread “main“ java.lang.StackOverflowError报错Exception in thread “main” java.lang.StackOverflowError解决方案:

原因:栈内存溢出

解决方案:

修改spark相关配置:

  1. 进入spark conf目录
[[email protected] opt]# cd /opt/soft/spark234/conf/
           
  1. 拷贝配置文件spark-defaults.conf.template并添加配置:
[[email protected] conf]# cp spark-defaults.conf.template spark-defaults.conf


# 文末插入
spark.driver.extraJavaOptions="-xsS30M"
           
spark提交maven程序报错Exception in thread “main“ java.lang.StackOverflowError报错Exception in thread “main” java.lang.StackOverflowError解决方案:
  1. 重启spark,再次提交运行,运行成功!( •̀ ω •́ )✧