Hi All, can anyone tell me how can I read the coun...
# troubleshooting
a
Hi All, can anyone tell me how can I read the counter value which is set in a map function. I have a class named "Read.java" which calls the "CsvRowWrapper.java"'s map function. CsvRowWrapper.java sets the counter value using MetricGroup. How to read this counter value in "Read.java"? public class CsvRowWrapper extends RichMapFunctionObject, Row { private static final long serialVersionUID = 1L; private transient Counter counter; @Override public void open(Configuration config) { this.counter = getRuntimeContext() .getMetricGroup() .counter("myCounter"); } @Override public Row map(Object value) { this.counter.inc(); HashMapString, Object tempMap = (HashMapString, Object) value; return Row._of_(tempMap.values().toArray()); } }
d
How to read this counter value in "Read.java"?
You won't be able to do that.