Support Questions
Find answers, ask questions, and share your expertise
Announcements
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

New Contributor

@Sreenivas Adiki

I am not able to compile a program myconsumer.java 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 <> myconsumer.java with no success REgards SReeni

1 REPLY 1

Re: Compliation errors using Kafka

Mentor

@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 https://community.hortonworks.com/questions/15403/need-a-list-of-component-name-groupid-artifactid-a...

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