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

Add SimpleStateDescriptor to clarify the concepts

    XMLWordPrintableJSON

Details

    • Improvement
    • Status: Closed
    • Major
    • Resolution: Invalid
    • None
    • None
    • None

    Description

      Currently, StateDescriptors accept two type arguments : the first one is the type of the created state and the second one is the type of the values in the states.

      The concepts however is a little confusing here because in ListStates, the arguments passed to the StateDescriptors are the types of the list elements instead of the lists. It also makes the implementation of MapStates difficult.

      I suggest not to put the type serializer in StateDescriptors, making StateDescriptors independent of the data structures of the values.

      A new type of StateDescriptor named SimpleStateDescriptor can be provided to abstract those states (namely ValueState, ReducingState and FoldingState) whose states are not composited.

      The states (e.g. ListStates and MapStates) can implement their own descriptors according to their data structures.

      Attachments

        Issue Links

          Activity

            People

              shixg Xiaogang Shi
              shixg Xiaogang Shi
              Votes:
              0 Vote for this issue
              Watchers:
              6 Start watching this issue

              Dates

                Created:
                Updated:
                Resolved: