我根据这个lib文件夹为系统监控添加了依赖项
wget https://repo1.maven.org/maven2/com/github/oshi/oshi-core/3.4.0/oshi-core-3.4.0.jar
wget https://repo1.maven.org/maven2/net/java/dev/jna/jna-platform/4.2.2/jna-platform-4.2.2.jar
wget https://repo1.maven.org/maven2/net/java/dev/jna/jna/4.2.2/jna-4.2.2.jar
但给我看看这个例外:
WARN org.apache.flink.runtime.metrics.MetricRegistryImpl - Error while reporting metrics
java.lang.NoSuchMethodError: org.apache.flink.metrics.influxdb.shaded.okio.BufferedSource.getBuffer()Lorg/apache/flink/metrics/influxdb/shaded/okio/Buffer;
at org.apache.flink.metrics.influxdb.shaded.com.squareup.moshi.JsonUtf8Reader.<init>(JsonUtf8Reader.java:97)
at org.apache.flink.metrics.influxdb.shaded.com.squareup.moshi.JsonReader.of(JsonReader.java:196)
at org.apache.flink.metrics.influxdb.shaded.com.squareup.moshi.JsonAdapter.fromJson(JsonAdapter.java:40)
at org.apache.flink.metrics.influxdb.shaded.org.influxdb.InfluxDBException.buildExceptionForErrorState(InfluxDBException.java:172)
at org.apache.flink.metrics.influxdb.shaded.org.influxdb.impl.InfluxDBImpl.execute(InfluxDBImpl.java:821)
at org.apache.flink.metrics.influxdb.shaded.org.influxdb.impl.InfluxDBImpl.write(InfluxDBImpl.java:460)
at org.apache.flink.metrics.influxdb.InfluxdbReporter.report(InfluxdbReporter.java:118)
at org.apache.flink.runtime.metrics.MetricRegistryImpl$ReporterTask.run(MetricRegistryImpl.java:441)
at java.util.concurrent.Executors$RunnableAdapter.call(Executors.java:511)
at java.util.concurrent.FutureTask.runAndReset(FutureTask.java:308)
at java.util.concurrent.ScheduledThreadPoolExecutor$ScheduledFutureTask.access$301(ScheduledThreadPoolExecutor.java:180)
at java.util.concurrent.ScheduledThreadPoolExecutor$ScheduledFutureTask.run(ScheduledThreadPoolExecutor.java:294)
at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1149)
at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:624)
at java.lang.Thread.run(Thread.java:748)
1条答案
按热度按时间niknxzdl1#
这是flink-12147引入的flink bug。问题是,我们在不影响可传递依赖关系的情况下,影响了依赖关系版本。我创建了问题flink-16635来解决这个问题。本期还包含有关问题原因的更多详细信息。
更新
flink 1.10.1和1.11.0已经修复了这个问题。