Scala fat jar dependency issue while Job submit

后端 未结 2 1404
情书的邮戳
情书的邮戳 2021-01-23 00:17

I have written simple kafka stream using Scala. It is working good in local. I have taken fat jar and submitted in scala cluster. I am getting class not found error after submit

2条回答
  •  后悔当初
    2021-01-23 01:01

    You are missing the kafka dependency:

    "org.apache.kafka" %% "kafka" % "0.10.1.0"
    

    Add that an you will be all good.

    I have my build.sbt setup like this:

    "org.apache.kafka" %% "kafka"                      % "0.10.1.0",
    "org.apache.spark" %% "spark-streaming-kafka-0-10" % "2.2.0",
    "org.apache.spark" %% "spark-streaming"            % "2.2.0" % "provided"
    

提交回复
热议问题