Spark提交集群模式-NoClassDefFoundError

时间:2018-07-08 14:42:32

标签: apache-spark spark-submit

我在集群模式下提交Spark作业时遇到错误。 –部署模式客户端模型运行正常

/usr/spark2.0.2/bin/    spark-submit --name hello --master yarn --deploy-mode client --executor-memory 1g --executor-cores 1 --num-executors 1 --class com.first.load.Hello /home/udaychitukula6587/first.load/target/scala-2.10/helloworld_2.10-1.0.jar

以下一个抛出错误:

/usr/spark2.0.2/bin/    spark-submit --name hello --master yarn --deploy-mode cluster --executor-memory 1g --executor-cores 1 --num-executors 1 --class com.first.load.Hello /home/udaychitukula6587/first.load/target/scala-2.10/helloworld_2.10-1.0.jar*

错误:

*:: problems summary ::
:::: ERRORS
_ unknown resolver null_
:: USE VERBOSE OR DEBUG MESSAGE LEVEL FOR MORE DETAILS
:: retrieving :: org.apache.spark#spark-submit-parent
_ confs: [default]_
_ 0 artifacts copied, 17 already retrieved (0kB/19ms)_

    Exception in thread “main” java.lang.NoClassDefFoundError: com/sun/jersey/api/client/config/ClientConfig
    _ at org.apache.hadoop.yarn.client.api.TimelineClient.createTimelineClient(TimelineClient.java:55)_
    _ at org.apache.hadoop.yarn.client.api.impl.YarnClientImpl.createTimelineClient(YarnClientImpl.java:181)_
    _ at org.apache.hadoop.yarn.client.api.impl.YarnClientImpl.serviceInit(YarnClientImpl.java:168)_*

该程序将打印欢迎消息

请帮助我解决这个问题

1 个答案:

答案 0 :(得分:0)

似乎您在类路径中缺少jersey-client。使用--jars选项下载并添加到您的类路径中