Github user Aitozi commented on a diff in the pull request:
https://github.com/apache/flink/pull/4665#discussion_r138789377
--- Diff:
flink-streaming-java/src/main/java/org/apache/flink/streaming/runtime/operators/windowing/WindowOperator.java
---
@@ -132,6 +133,13 @@
*/
protected final OutputTag<IN> lateDataOutputTag;
+ /**
+ * Metrics about the lost data due to arrive late.
+ * */
+ protected final String loseData = "lost_data";
+
+ protected Counter lostDataCount;
--- End diff --
@zentol if i use `protected final Counter lostDataCount = new
SimpleCounter()` then i run into `Caused by: java.io.NotSerializableException:
org.apache.flink.metrics.SimpleCounter` because `SimpleCounter` is not
Serializable, so i think i should use the old way that `
this.lostDataCount = metrics.counter(LATE_ELEMENTS_METRIC_NAME);` in open
method
---