I am following this Flink Kafka example This is my edited program. I am using Flink 1.5 in flink-scala shell import org.apache.flink.streaming.api.scala._ import org.apache.flink.streaming.connectors.kafka.FlinkKafkaConsumer082 import org.apache.flink.streaming.util.serialization.SimpleStringSchema import java.util.Properties But I am getting this error scala> import org.apache.flink.streaming.api.scala._ import org.apache.flink.streaming.api.scala._ scala> import org.apache.flink.streaming.connectors.kafka.FlinkKafkaConsumer082 <console>:76: error: object connectors is not a member of package org.apache.flink.streaming import org.apache.flink.streaming.connectors.kafka.FlinkKafkaConsumer082 any reason I am getting this error? Are the jar files missing? Cab one add jar files as parameters to start-scala-shell.sh local Thanks Dr Mich Talebzadeh
LinkedIn https://www.linkedin.com/profile/view?id=AAEAAAAWh2gBxianrbJd6zP6AcPCCdOABUrV8Pw
http://talebzadehmich.wordpress.com Disclaimer: Use it at your own risk. Any and all responsibility for any loss, damage or destruction of data or any other property which may arise from relying on this email's technical content is explicitly disclaimed. The author will in no case be liable for any monetary damages arising from such loss, damage or destruction.
|
Please add flink-connector-kafka-base_2.11 jar to the classpath. On Sat, Jun 30, 2018 at 1:06 AM, Mich Talebzadeh <[hidden email]> wrote:
|
Hi Mich, Ted is correct, Flink release binary does not include any connectors and you will have to include the appropriate connector version. This is to avoid dependency conflicts between different Kafka releases. You probably need the specific Kafka connector version jar file as well, so in your case since you are using the scala shell. The following command should work: ./bin/start-scala-shell.sh --addclasspath "<your_flink-connector-kafka-0.8_2.11.jar>:<your_flink-connector-kafka-base_2.11>" -- Rong On Sat, Jun 30, 2018 at 1:11 AM Ted Yu <[hidden email]> wrote:
|
Thanks Rong This worked. $FLINK_HOME/bin/start-scala-shell.sh local --addclasspath /home/hduser/jars/flink-connector-kafka-0.9_2.11-1.5.0.jar:/home/hduser/jars/flink-connector-kafka-base_2.11-1.5.0.jar Regards, Dr Mich Talebzadeh
LinkedIn https://www.linkedin.com/profile/view?id=AAEAAAAWh2gBxianrbJd6zP6AcPCCdOABUrV8Pw
http://talebzadehmich.wordpress.com Disclaimer: Use it at your own risk. Any and all responsibility for any loss, damage or destruction of data or any other property which may arise from relying on this email's technical content is explicitly disclaimed. The author will in no case be liable for any monetary damages arising from such loss, damage or destruction.
On Sat, 30 Jun 2018 at 17:00, Rong Rong <[hidden email]> wrote:
|
Free forum by Nabble | Edit this page |