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

StreamExecMatchRule not set FlinkRelDistribution

    XMLWordPrintableJSON

Details

    Description

      StreamExecMatchRule forgets to set FlinkRelDistribution. When match clause with `partition by`, and parallelism > 1, will result in following exception:

      ```
      Caused by: java.lang.NullPointerException
      at org.apache.flink.runtime.state.heap.StateTable.put(StateTable.java:336)
      at org.apache.flink.runtime.state.heap.StateTable.put(StateTable.java:159)
      at org.apache.flink.runtime.state.heap.HeapMapState.put(HeapMapState.java:100)
      at org.apache.flink.runtime.state.UserFacingMapState.put(UserFacingMapState.java:52)
      at org.apache.flink.cep.nfa.sharedbuffer.SharedBuffer.registerEvent(SharedBuffer.java:141)
      at org.apache.flink.cep.nfa.sharedbuffer.SharedBufferAccessor.registerEvent(SharedBufferAccessor.java:74)
      at org.apache.flink.cep.nfa.NFA$EventWrapper.getEventId(NFA.java:483)
      at org.apache.flink.cep.nfa.NFA.computeNextStates(NFA.java:605)
      at org.apache.flink.cep.nfa.NFA.doProcess(NFA.java:292)
      at org.apache.flink.cep.nfa.NFA.process(NFA.java:228)
      at org.apache.flink.cep.operator.CepOperator.processEvent(CepOperator.java:420)
      at org.apache.flink.cep.operator.CepOperator.processElement(CepOperator.java:242)
      at org.apache.flink.streaming.runtime.tasks.OneInputStreamTask$StreamTaskNetworkOutput.emitRecord(OneInputStreamTask.java:173)
      at org.apache.flink.streaming.runtime.io.StreamTaskNetworkInput.processElement(StreamTaskNetworkInput.java:151)
      at org.apache.flink.streaming.runtime.io.StreamTaskNetworkInput.emitNext(StreamTaskNetworkInput.java:128)
      at org.apache.flink.streaming.runtime.io.StreamOneInputProcessor.processInput(StreamOneInputProcessor.java:69)
      at org.apache.flink.streaming.runtime.tasks.StreamTask.processInput(StreamTask.java:311)
      at org.apache.flink.streaming.runtime.tasks.mailbox.MailboxProcessor.runMailboxLoop(MailboxProcessor.java:187)
      at org.apache.flink.streaming.runtime.tasks.StreamTask.runMailboxLoop(StreamTask.java:488)
      at org.apache.flink.streaming.runtime.tasks.StreamTask.invoke(StreamTask.java:470)
      at org.apache.flink.runtime.taskmanager.Task.doRun(Task.java:702)
      at org.apache.flink.runtime.taskmanager.Task.run(Task.java:527)
      at java.lang.Thread.run(Thread.java:748)
      ```

      Attachments

        Issue Links

          Activity

            People

              libenchao Benchao Li
              libenchao Benchao Li
              Votes:
              0 Vote for this issue
              Watchers:
              3 Start watching this issue

              Dates

                Created:
                Updated:
                Resolved:

                Time Tracking

                  Estimated:
                  Original Estimate - Not Specified
                  Not Specified
                  Remaining:
                  Remaining Estimate - 0h
                  0h
                  Logged:
                  Time Spent - 20m
                  20m