spark提交失败,因为线程“main”java.lang.nosuchmethodexception中出现异常

mrwjdhj3  于 2021-06-01  发布在  Hadoop
关注(0)|答案(0)|浏览(262)

当我试图提交spark作业进行测试时,我得到了下面的错误信息。

jianrui@spark:~$ sudo $SPARK_HOME/bin/spark-submit --class com.test.spark.FirstScalaExample --master spark://spark.sparkstreaming.i10.internal.cloudapp.net:7077 /opt/spark/FirstScalaExample-0.0.1.jar
Exception in thread "main" java.lang.NoSuchMethodException: com.test.spark.FirstScalaExample.main([Ljava.lang.String;)
	at java.lang.Class.getMethod(Class.java:1786)
	at org.apache.spark.deploy.JavaMainApplication.start(SparkApplication.scala:42)
	at org.apache.spark.deploy.SparkSubmit$.org$apache$spark$deploy$SparkSubmit$$runMain(SparkSubmit.scala:879)
	at org.apache.spark.deploy.SparkSubmit$.doRunMain$1(SparkSubmit.scala:197)
	at org.apache.spark.deploy.SparkSubmit$.submit(SparkSubmit.scala:227)
	at org.apache.spark.deploy.SparkSubmit$.main(SparkSubmit.scala:136)
	at org.apache.spark.deploy.SparkSubmit.main(SparkSubmit.scala)
2018-04-06 13:13:00 INFO  ShutdownHookManager:54 - Shutdown hook called
2018-04-06 13:13:00 INFO  ShutdownHookManager:54 - Deleting directory /tmp/spark-7f47cab1-f8b3-4731-bd67-e0d0ad013617

[scala版本-2.11.6]
[hadoop版本-2.7.5]
[Spark版本-2.3.0]
注:
我在“spark env.sh”中用“export ld\u library\u path=$hadoop\u home/lib/native”的方式指定了hadoop本机lib,我只提取spark而没有安装。
我不知道到底是什么问题。

暂无答案!

目前还没有任何答案,快来回答吧!

相关问题