Flink oshi-core异常
Flink oshi-core Exception
我根据this在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.access1(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)
这是 Flink 错误,已随 FLINK-12147. The problem is that we bumped a dependency version without bumping a transitive dependency as well. I have created the issue FLINK-16635 引入以修复此问题。此问题还包含有关导致问题的原因的更多详细信息。
更新
该问题已在 Flink 1.10.1 和 1.11.0 中修复。
我根据this在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.access1(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)
这是 Flink 错误,已随 FLINK-12147. The problem is that we bumped a dependency version without bumping a transitive dependency as well. I have created the issue FLINK-16635 引入以修复此问题。此问题还包含有关导致问题的原因的更多详细信息。
更新
该问题已在 Flink 1.10.1 和 1.11.0 中修复。