Github user zentol commented on a diff in the pull request:

    https://github.com/apache/flink/pull/4665#discussion_r138723827
  
    --- 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 --
    
    the counter is registered already in the open method upon initialization, i 
think we're good on that front.
    
    However, i would suggest to change this line to `protected final Counter 
lostDataCount = new SimpleCounter()`, and the line in open() to 
`metrics.counter(lostData, this.lostDataCount);`


---

Reply via email to