相关文章推荐
帅呆的匕首  ·  CVE-2022-31268·  2 月前    · 
睿智的荒野  ·  PanWriter-0.8.3.AppIma ...·  8 月前    · 
唠叨的豌豆  ·  TypeError: Cannot ...·  10 月前    · 
挂过科的熊猫  ·  awk - How to check if ...·  11 月前    · 

Hello all,

I am trying to connect to Kafka from my Flink flow. I am using Flink version 1.14.3 and Kafka connector version: flink-connector-kafka-0.11_2.11:jar:1.11.6 (latest version in Maven repo) . I am using FlinkKafkaConsumer011 in my code to create Kafka consumer to consume my kafka topics. However, when running Flink and deploying my flow, I see the below error thrown in logs:

java.lang.NoSuchMethodError: org.apache.flink.api.common.functions.RuntimeContext.getMetricGroup()Lorg/apache/flink/metrics/MetricGroup;
at org.apache.flink.streaming.connectors.kafka.FlinkKafkaConsumerBase.run(FlinkKafkaConsumerBase.java:762)
at org.apache.flink.streaming.api.operators.StreamSource.run(StreamSource.java:110)
at org.apache.flink.streaming.api.operators.StreamSource.run(StreamSource.java:67)
at org.apache.flink.streaming.runtime.tasks.SourceStreamTask$LegacySourceFunctionThread.run(SourceStreamTask.java:323)

Appreciate any help on this.

- Prabu.

I believe the Kafka connectors are discontinued from Flink 1.12. From release notes: In Flink 1.12 we removed the Kafka 0.10.x and 0.11.x connectors. Please use the universal Kafka connector which works with any Kafka cluster version after 0.10.2.x.

https://nightlies.apache.org/flink/flink-docs-release-1.14/release-notes/flink-1.12/#connectors-and-...

I believe the Kafka connectors are discontinued from Flink 1.12. From release notes: In Flink 1.12 we removed the Kafka 0.10.x and 0.11.x connectors. Please use the universal Kafka connector which works with any Kafka cluster version after 0.10.2.x.

https://nightlies.apache.org/flink/flink-docs-release-1.14/release-notes/flink-1.12/#connectors-and-...

Apache Hadoop and associated open source project names are trademarks of the Apache Software Foundation. For a complete list of trademarks, click here.