Kafka Issues while using KafkaUtils createDirectStream


#1

Hi All,

I am getting an error while running the Kafka Streaming prog as below. Can anyone help me on this issue

My code is as below
val topics = “testKafkaWithTwitter”
val stream = KafkaUtils.createDirectStream[String, String, StringDecoder, StringDecoder](
ssc, kafkaParams, topics)
//val stream = KafkaUtils.createDirectStream[String, String](
// streamingContext,
// PreferConsistent,
// Subscribe[String, String](topics, kafkaParams)
//)

Name: Compile Error
Message: :171: error: bad symbolic reference. A signature in KafkaUtils.class refers to term internal
in package org.apache.spark which is not available.
It may be completely missing from the current classpath, or the version on
the classpath might be incompatible with the version used when compiling KafkaUtils.class.
val stream = KafkaUtils.createDirectStream[String, String, StringDecoder, StringDecoder](


#2

There was some issue with jar files. Resolved the issue now.


#3

Great!

Happy learning