Apache flink 弗林克:当我添加仪表时,构建失败了
无法使用仪表,生成失败:Apache flink 弗林克:当我添加仪表时,构建失败了,apache-flink,flink-streaming,Apache Flink,Flink Streaming,无法使用仪表,生成失败: def open(configuration: Configuration) { getRuntimeContext() .getMetricGroup() .gauge("RecordConverter.latency", new Gauge[Int]() { @Override def getValue(): Int = { return latency; } }); } ==
def open(configuration: Configuration) {
getRuntimeContext()
.getMetricGroup()
.gauge("RecordConverter.latency", new Gauge[Int]() {
@Override
def getValue(): Int = {
return latency;
}
});
}
============================================================
error: overloaded method value gauge with alternatives:
[ERROR] [T, G <: org.apache.flink.metrics.Gauge[T]](x$1: String,x$2: G)G <and>
[ERROR] [T, G <: org.apache.flink.metrics.Gauge[T]](x$1: Int, x$2: G)G
[ERROR] cannot be applied to (String, org.apache.flink.metrics.Gauge[Int])
[ERROR] .gauge("RecordConverter.latency", new Gauge[Int]() {
[ERROR] ^
错误:重载方法值量表,带有备选值:
[错误][T,G您必须显式设置类型,如下所示:
.gauge[Int, Gauge[Int]]("RecordConverter.latency"...