Support Questions
Find answers, ask questions, and share your expertise
Alert: Welcome to the Unified Cloudera Community. Former HCC members be sure to read and learn how to activate your account here.

Compliation errors using Kafka

Compliation errors using Kafka


@Sreenivas Adiki

I am not able to compile a program which uses the following classes from kafka import kafka.consumer.Consumer; import kafka.consumer.ConsumerConfig; import kafka.consumer.ConsumerIterator; import kafka.consumer.KafkaStream; import kafka.javaapi.consumer.ConsumerConnector; import org.apache.spark.sql.DataFrame; import org.apache.spark.sql.SQLContext; It gives errors " cannot load or not found " is there way to resolve this . I have already tried including classpath or using javac -classpath <> with no success REgards SReeni


Re: Compliation errors using Kafka


@Sreenivas Adiki you need to modify your pom.xm! File and add dependencies for Kafka and spark based on the versions of your cluster. Please look in our documentation for the right repositories.

Here's an example

Don't have an account?
Coming from Hortonworks? Activate your account here