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

Fix Serialization of NFA in AbstractKeyedCEPPatternOperator

    XMLWordPrintableJSON

Details

    • Bug
    • Status: Resolved
    • Blocker
    • Resolution: Fixed
    • 1.0.0, 1.0.1, 1.0.2, 1.0.3, 1.1.0
    • 1.1.0
    • Library / CEP
    • 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

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

              Dates

                Created:
                Updated:
                Resolved: