we are using spark streaming to read and write from kafka and uses the KafkaUtils libary in spark-streaming_2.11 which has the kafka 0.10.0 libs. Right I am in the process of upgrading the kafka-client jars to 0.11 to use some feature but since spark-streaming has the kafka 0.10 its not getting used.I tried to exclude the same from spark-streaming but its complaining about below KafkaUtils class which is in 0.10 only. Even 2.3 is coming bundled with kafka0.10 (spark-streaming-kafka-0-10_2.11-2.3.0.cloudera2.jar) . How i can i get rid of this dependency of KAfkautils in 2.10 ?
SCALA CODE for spark streaming Direct Stream creation
import org.apache.spark.streaming.kafka010.KafkaUtils
val directKafkaStream = KafkaUtils.createDirectStream[String, String](
ssc, PreferConsistent, Subscribe[String, String](topicSet,
conf.kafkaParams))
POM.XML
<dependency>
<groupId>org.apache.kafka</groupId>
<artifactId>kafka-clients</artifactId>
<version>0.10.0.0</version>
</dependency>
<dependency>
<groupId>org.apache.spark</groupId>
<artifactId>spark-streaming-kafka-0-10_2.11</artifactId>
<version>2.1.0.cloudera1</version>
<scope>provided</scope>
</dependency>