KafkaUtils class not found in Spark streaming

后端 未结 9 1545
囚心锁ツ
囚心锁ツ 2021-01-11 20:14

I have just began with Spark Streaming and I am trying to build a sample application that counts words from a Kafka stream. Although it compiles with sbt package

9条回答
  •  被撕碎了的回忆
    2021-01-11 20:37

    You could also download the jar file and put it in the Spark lib folder, because it is not installed with Spark, instead of beating your head trying to bet SBT build.sbt to work.

    http://central.maven.org/maven2/org/apache/spark/spark-streaming-kafka-0-10_2.10/2.1.1/spark-streaming-kafka-0-10_2.10-2.1.1.jar

    copy it to:

    /usr/local/spark/spark-2.1.0-bin-hadoop2.6/jars/

提交回复
热议问题