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

Fix Serialization of NFA in AbstractKeyedCEPPatternOperator

    XMLWordPrintableJSON

    Details

    • Type: Bug
    • Status: Resolved
    • Priority: Blocker
    • Resolution: Fixed
    • Affects Version/s: 1.0.0, 1.0.1, 1.0.2, 1.0.3, 1.1.0
    • Fix Version/s: 1.1.0
    • Component/s: Library / CEP
    • Labels:
      None

      Description

      A job that uses CEP fails upon restore with a NullPointerException in NFA.process(). The reason seems to be that field computationStates is null. This field is transient and read in a custom readObject() method.

      In AbstractKeyedCEPPatternOperator this snipped is used to construct a StateDescriptor for an NFA state:

      new ValueStateDescriptor<NFA<IN>>(
          NFA_OPERATOR_STATE_NAME,
          new KryoSerializer<NFA<IN>>((Class<NFA<IN>>) (Class<?>) NFA.class, getExecutionConfig()),
          null)
      

      It seems Kryo does not invoke readObject/writeObject. We probably need a custom TypeSerializer for NFA to solve the problem.

        Attachments

          Issue Links

            Activity

              People

              • Assignee:
                aljoscha Aljoscha Krettek
                Reporter:
                aljoscha Aljoscha Krettek
              • Votes:
                0 Vote for this issue
                Watchers:
                4 Start watching this issue

                Dates

                • Created:
                  Updated:
                  Resolved: