1
flink-connector-kafka-0.9 コネクタでFlinkを実行しているときに、以下のエラーが表示されます。Flink実行中のClassCastException
Exception in thread "main" java.lang.ClassCastException: org.apache.flink.streaming.connectors.kafka.FlinkKafkaProducer cannot be cast to org.apache.flink.streaming.api.functions.source.SourceFunction
at com.dataartisans.ReadFromKafka.main(ReadFromKafka.java:57)
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62)
at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
at java.lang.reflect.Method.invoke(Method.java:497)
at com.intellij.rt.execution.application.AppMain.main(AppMain.java:144)
Initially I was able to fetch records from Kafka . But now getting the above error .