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

add KeyedProcessFunction to expose the key in onTimer() and other methods

    Details

    • Type: Improvement
    • Status: Closed
    • Priority: Major
    • Resolution: Fixed
    • Affects Version/s: 1.4.0
    • Fix Version/s: 1.5.0
    • Component/s: DataStream API
    • Labels:
      None

      Description

      Currently it is required to store the key of a keyBy() in the processElement method to have access to it in the OnTimerContext.

      This is not so good as you have to check in the processElement method for every element if the key is already stored and set it if it's not already set.

      A possible solution would adding OnTimerContext#getCurrentKey() or a similar method. Maybe having it in the open() method could maybe work as well.

      http://apache-flink-user-mailing-list-archive.2336050.n4.nabble.com/Getting-Key-from-keyBy-in-ProcessFunction-tt18126.html

        Attachments

          Issue Links

            Activity

              People

              • Assignee:
                phoenixjiangnan Bowen Li
                Reporter:
                juergen_thomann Jürgen Thomann
              • Votes:
                0 Vote for this issue
                Watchers:
                6 Start watching this issue

                Dates

                • Created:
                  Updated:
                  Resolved: