[英]Exception in thread “streaming-start” java.lang.NoSuchMethodError: org.apache.kafka.clients.consumer.KafkaConsumer.subscribe(Ljava/util/Collection;)V
When I submit the spark application, getting the below error: 当我提交spark应用程序时,得到以下错误:
Exception in thread "streaming-start" java.lang.NoSuchMethodError: 线程“streaming-start”中的异常java.lang.NoSuchMethodError:
org.apache.kafka.clients.consumer.KafkaConsumer.subscribe(Ljava/util/Collection;)V
org.apache.kafka.clients.consumer.KafkaConsumer.subscribe(Ljava / UTIL /收藏;)V
Went through the below URL: http://apache-spark-developers-list.1001551.n3.nabble.com/testing-the-kafka-0-10-connector-td17956.html 浏览以下网址: http : //apache-spark-developers-list.1001551.n3.nabble.com/testing-the-kafka-0-10-connector-td17956.html
Set the below environment variable: SPARK_KAFKA_VERSION=0.10
设置以下环境变量:
SPARK_KAFKA_VERSION=0.10
Added the below dependency: 添加了以下依赖项:
<dependency>
<groupId>org.apache.spark</groupId>
<artifactId>spark-streaming-kafka-0-10_2.11</artifactId>
<version>2.1.0.cloudera1</version>
</dependency>
Added the below jar: spark-streaming-kafka-0-10-assembly_2.11.jar 添加了以下jar:spark-streaming-kafka-0-10-assembly_2.11.jar
Versions I'm using: 我正在使用的版本:
A piece of code: 一段代码:
val CLASS_NAME = this.getClass
val log = org.apache.log4j.LogManager.getLogger(CLASS_NAME)
Your help is highly appreciated. 非常感谢您的帮助。
Try seting this: 试试这个:
export SPARK_KAFKA_VERSION=0.10
export SPARK_KAFKA_VERSION = 0.10
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.