Uploaded image for project: 'Flink'
  1. Flink
  2. FLINK-9299

ProcessWindowFunction documentation Java examples have errors

    XMLWordPrintableJSON

Details

    • Bug
    • Status: Closed
    • Minor
    • Resolution: Fixed
    • 1.4.2
    • 1.5.0
    • Documentation
    • None

    Description

      In looking at https://ci.apache.org/projects/flink/flink-docs-release-1.4/dev/stream/operators/windows.html#processwindowfunction-with-incremental-aggregation, I noticed a few errors...

      • "This allows to incrementally compute windows" should be "This allows it to incrementally compute windows"
      • DataStream<Tuple2<String, Long> input = ...; should be DataStream<Tuple2<String, Long>> input = ...;
      • The getResult() method needs to cast one of the accumulator values to a double, if that's what it is going to return.
      • MyProcessWindowFunction needs to extend, not implement ProcessWindowFunction
      • MyProcessWindowFunction needs to implement a process() method, not an apply() method.
      • The call to .timeWindow takes a Time parameter, not a window assigner.

       

      Attachments

        Activity

          People

            yanghua vinoyang
            kkrugler Kenneth William Krugler
            Votes:
            0 Vote for this issue
            Watchers:
            5 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved: