Felix Angell
04/19/2023, 2:56 PM2023-04-19 15:49:21
java.lang.NoSuchMethodError: 'org.apache.flink.metrics.MetricGroup org.apache.flink.api.common.functions.RuntimeContext.getMetricGroup()'
at org.apache.flink.streaming.connectors.kafka.FlinkKafkaConsumerBase.run(FlinkKafkaConsumerBase.java:765)
we have a pyflink app that bundles with a fat jar of some extra utilities where we do stuff in java-land, e.g. deserialisation stuff, and so on.
flink-streaming-java is the only dependency in the POM.xml file that is marked as provided. our dependencies are: flink-streaming-java, flink-java, flink-core, flink-connector-kafka, kafka-clients (2.8.1).
everything is set to be version 1.15.2 (other than the kafka-clients).
any ideas what is up here? thanks!Felix Angell
04/19/2023, 3:01 PMstatefun. is this relevant for 1.15.2? we don't use stateful functions in our submitted jobs so not sure if this is an internal thing or notMartijn Visser
04/19/2023, 4:38 PMMartijn Visser
04/19/2023, 4:38 PMMartijn Visser
04/19/2023, 4:39 PMFelix Angell
04/19/2023, 5:02 PMDian Fu
04/20/2023, 1:48 AMRuntimeContext.getMetricGroup , see https://github.com/apache/flink/blob/4799111928a74f73b96292560440f92f18caf0cf/flin[…]/java/org/apache/flink/api/common/functions/RuntimeContext.java for more detailsFelix Angell
04/20/2023, 9:03 AM<artifactId>flink-connector-kafka</artifactId> which is specified to 1.15.2.
@Hong Teoh sorry to tag, is there anything you know around the runtime dependencies versions on PyFlink on KDA? Afaik all of this is out of the box so I'm wondering if these 1.15.2 dependencies conflict with something defined at runtime?Felix Angell
04/20/2023, 9:26 AMFelix Angell
04/20/2023, 2:01 PMFelix Angell
04/20/2023, 2:01 PM2023-04-20 15:00:07
java.lang.NoSuchMethodError: 'org.apache.flink.metrics.MetricGroup org.apache.flink.api.connector.source.SourceReaderContext.metricGroup()'
at org.apache.flink.connector.kafka.source.KafkaSource.createReader(KafkaSource.java:138)
at org.apache.flink.streaming.api.operators.SourceOperator.initReader(SourceOperator.java:286)Felix Angell
04/20/2023, 2:02 PMFelix Angell
04/20/2023, 2:03 PMHong Teoh
04/20/2023, 2:13 PMunless, i need to provide flink-metrics/flink-metrics-core as a dependency? (edited)No, this should not be needed. It seems to be complaining that the
RuntimeContext does not have method getMetricGroup() (present in 1.15.2) and SourceReaderContext does not have method metricGroup() (also present in 1.15.2)
My suspicion is now that either the runtime your app is on is not Flink 1.15, OR that the fatjar somehow has transitive dependencies that is <1.15
Do you mind PM-ing the pom.xml?Felix Angell
04/20/2023, 2:14 PMFelix Angell
04/20/2023, 2:14 PMFelix Angell
04/20/2023, 3:11 PM