我试着用这两种方法安装spark\u avro包
第1种方法
spark-submit --packages org.apache.spark:spark-avro:3.0.2 ...
第二种方法
spark-submit --jars spark-avro_2.12-3.0.2.jar ...
对于第二种方法,我下载了所需的jar并将其放在spark所在的文件夹中,然后运行。
两种方法都显示相同的异常:
C:\spark\spark\bin>spark-submit --packages org.apache.spark:spark-avro_2.12:3.0.2 ...
C:\spark\spark\bin>spark-submit --jars spark-avro_2.12-3.0.2.jar ...
这两个都给出了如下相同的错误,
Exception in thread "main" org.apache.spark.SparkException: Failed to get main class in JAR with error 'C:\spark\spark\bin\... (Access is denied)'. Please specify one with --class.
at org.apache.spark.deploy.SparkSubmit.error(SparkSubmit.scala:936)
at org.apache.spark.deploy.SparkSubmit.prepareSubmitEnvironment(SparkSubmit.scala:457)
at org.apache.spark.deploy.SparkSubmit.org$apache$spark$deploy$SparkSubmit$$runMain(SparkSubmit.scala:871)
at org.apache.spark.deploy.SparkSubmit.doRunMain$1(SparkSubmit.scala:180)
at org.apache.spark.deploy.SparkSubmit.submit(SparkSubmit.scala:203)
at org.apache.spark.deploy.SparkSubmit.doSubmit(SparkSubmit.scala:90)
at org.apache.spark.deploy.SparkSubmit$$anon$2.doSubmit(SparkSubmit.scala:1007)
at org.apache.spark.deploy.SparkSubmit$.main(SparkSubmit.scala:1016)
at org.apache.spark.deploy.SparkSubmit.main(SparkSubmit.scala)
暂无答案!
目前还没有任何答案,快来回答吧!