在IDEA上编写spark程序,打成jar包之后,上传到服务器,然后以yarn cluster模式提交:bin/spark-submit --class com.BRC.spark.WordCount --master yarn --deploy-mode cluster ./wordcount-1.0-SNAPSHOT.jar hdfs://test-szzt01:8020/test/hello.txt hdfs://test-szzt01:8020/test/output2
出现下列错误:
spark-submit报错java.lang.IllegalStateException: User did not initialize spark context!
查看resource manager的8088端口,找到任务所在的log日志:
spark-submit报错java.lang.IllegalStateException: User did not initialize spark context!
出现这种情况的原因是在IDEA中编写程序时,加入了如下代码
spark-submit报错java.lang.IllegalStateException: User did not initialize spark context!

相关文章:

  • 2021-09-16
  • 2022-02-18
  • 2021-09-19
  • 2022-12-23
  • 2021-12-01
  • 2022-02-13
  • 2022-02-14
  • 2022-12-23
猜你喜欢
  • 2021-07-17
  • 2022-12-23
  • 2021-09-04
  • 2022-01-12
  • 2021-04-07
  • 2022-12-23
  • 2022-12-23
相关资源
相似解决方案