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

    https://github.com/apache/flink/pull/5497#discussion_r168698288
  
    --- Diff: docs/dev/migration.md ---
    @@ -145,16 +145,16 @@ public class BufferingSink implements 
SinkFunction<Tuple2<String, Integer>>,
             bufferedElements.add(value);
             if (bufferedElements.size() == threshold) {
                 for (Tuple2<String, Integer> element: bufferedElements) {
    -           // send it to the sink
    -       }
    -       bufferedElements.clear();
    -   }
    +            // send it to the sink
    +        }
    +        bufferedElements.clear();
    --- End diff --
    
    I don't know whether you agree with me or not :(
    
    Looking at the raw code one sees that the modified section should be 
indented with 4 more spaces:
    ```
        @Override
        public void invoke(Tuple2<String, Integer> value) throws Exception {
            bufferedElements.add(value);
            if (bufferedElements.size() == threshold) {
                for (Tuple2<String, Integer> element: bufferedElements) {
                // send it to the sink
            }
            bufferedElements.clear();
        }
        }
    ```


---

Reply via email to