Hello, I am trying to use <ScheduledDropwizardRep...
# troubleshooting
n
Hello, I am trying to use ScheduledDropwizardReporter for reporting metrics from my flink app. I am getting the following error on line 133 of this file.
Copy code
2023-02-13 10:58:05,901 WARN  org.apache.flink.runtime.metrics.MetricRegistryImpl          [] - Error while registering metric: numRecordsOut.
java.lang.ClassCastException: class org.apache.flink.dropwizard.metrics.FlinkCounterWrapper cannot be cast to class com.codahale.metrics.Metric (org.apache.flink.dropwizard.metrics.FlinkCounterWrapper is in unnamed module of loader 'app'; com.codahale.metrics.Metric is in unnamed module of loader org.apache.flink.core.plugin.PluginLoader$PluginClassLoader @5833f5cd)
Due to this error, the metric is not reported. On looking into this, FlinkCounterWrapper does extend codahale.Counter. Can anyone please tell me how to fix this?
n
Hi @Martijn Visser the link that you provided only talks about the same package classes com.foo.X. Here I have classes from two different packages. Can you please help on how to debug this
m
In 99% of the cases it’s either what’s documented or you are using a Java version higher then 11