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

NPE on EventTimeSessionWindows with ContinuousEventTimeTrigger

    Details

    • Type: Bug
    • Status: Closed
    • Priority: Major
    • Resolution: Fixed
    • Affects Version/s: 1.2.0, 1.1.3
    • Fix Version/s: 1.2.0, 1.1.4
    • Component/s: DataStream API, Streaming
    • Labels:
      None

      Description

      what's the error ?

      The following NPE error is thrown when EventTimeSessionWindows with ContinuousEventTimeTrigger is used.

      Caused by: java.lang.NullPointerException
      	at org.apache.flink.streaming.api.windowing.triggers.ContinuousEventTimeTrigger.clear(ContinuousEventTimeTrigger.java:91)
      	at org.apache.flink.streaming.runtime.operators.windowing.WindowOperator$Context.clear(WindowOperator.java:768)
      	at org.apache.flink.streaming.runtime.operators.windowing.WindowOperator$2.merge(WindowOperator.java:310)
      	at org.apache.flink.streaming.runtime.operators.windowing.WindowOperator$2.merge(WindowOperator.java:297)
      	at org.apache.flink.streaming.runtime.operators.windowing.MergingWindowSet.addWindow(MergingWindowSet.java:196)
      	at org.apache.flink.streaming.runtime.operators.windowing.WindowOperator.processElement(WindowOperator.java:297)
      	at org.apache.flink.streaming.runtime.io.StreamInputProcessor.processInput(StreamInputProcessor.java:183)
      	at org.apache.flink.streaming.runtime.tasks.OneInputStreamTask.run(OneInputStreamTask.java:66)
      	at org.apache.flink.streaming.runtime.tasks.StreamTask.invoke(StreamTask.java:271)
      	at org.apache.flink.runtime.taskmanager.Task.run(Task.java:609)
      	at java.lang.Thread.run(Thread.java:745)
      

      how to reproduce ?

      use ContinuousEventTimeTrigger instead of the default EventTimeTrigger in SessionWindowing example.

      what's the cause ?

      When two session windows are being merged, the states of the two ContinuousEventTimeTrigger are merged as well and the new namespace is the merged window. Later when the context tries to delete Timer from the old trigger and looks up the timestamp by the old namespace, null value is returned.

        Attachments

          Issue Links

            Activity

              People

              • Assignee:
                mauzhang Manu Zhang
                Reporter:
                mauzhang Manu Zhang
              • Votes:
                0 Vote for this issue
                Watchers:
                3 Start watching this issue

                Dates

                • Created:
                  Updated:
                  Resolved: