0
Flink에서 카운터를 추가하려고 시도한 것은 here입니다.하지만 counter.inc()는 Integer 대신 void를 반환합니다. 내 메트릭에 대한 코드는Flink 1.3.2에서 카운터를 추가 할 수 없습니다.
private static class myMetric extends RichMapFunction<String,Integer>
{
private Counter counter ;
@Override
public void open(Configuration parameters) throws Exception {
super.open(parameters);
this.getRuntimeContext().
getMetricGroup().
counter("countit");
}
@Override
public Integer map(String s) throws Exception {
return this.counter.inc();
}