Hey, has anyone run into this problem before: `jav...
# troubleshooting
f
Hey, has anyone run into this problem before:
Copy code
java.lang.NoSuchMethodError: 'org.apache.flink.metrics.MetricGroup org.apache.flink.api.common.functions.RuntimeContext.getMetricGroup()'
	at org.apache.flink.streaming.connectors.kinesis.internals.KinesisDataFetcher.<init>(KinesisDataFetcher.java:416)
	at org.apache.flink.streaming.connectors.kinesis.internals.KinesisDataFetcher.<init>(KinesisDataFetcher.java:365)
Essentially we've upgraded to 1.15.2 flink (on KDA) and we're using
flink-sql-connector-kinesis
v 1.15.3 which exposes a
FlinkKinesisConsumer
. We are using PyFlink and so we mapped this FlinkKinesisConsumer class with the
jvm_gateway
. On using this we get the above exception as of doing this upgrade. I can still resolve this
getMetricGroup
symbol manually if I were to add the dependency to this
flink-sql-connector-kinesis
pom in a typical java project, but in the PyFlink environment it doesn't seem to pick it up. Any ideas what is up here? Let me know if you need more details
I noted that
getMetricGroup()
has changed from
MetricGroup
to returning
OperatorMetricGroup
instead in 1.15. not sure if this would be relevant?
looks as though theres two flinkkinesisconsumers... one in this sql dependency but also one in
flink-connector-kinesis
m
flink-sql-connector-kinesis
is a fat JAR which usually is used in Table API/SQL application.
flink-connector-kinesis
is meant for DataStream API apps
f
ah right. so in our case the latter is the ideal jar to include here 🤦‍♂️
we are on 1.15.2 on kda. though the jar is versioned at 1.15.3 which i think could be why* since all the other jars uses 1.15.2. *we get nosuchmethod error due to compiling with mixed flink versions?
m
*we get nosuchmethod error due to compiling with mixed flink versions? (edited)
Patch versions should be compatible, unless the application relies on
Experimental
or
Internal
interfaces
f
that's what made me think this wouldnt be the issue + afaik 1.15.3 fixed a bug or something or other... i've read this somewhere ages ago but since forgotten