Uploaded image for project: 'Flink'
  1. Flink
  2. FLINK-3200 Use Partitioned State Abstraction in WindowOperator
  3. FLINK-3201

Enhance Partitioned State Interface with State Types

    XMLWordPrintableJSON

Details

    • Sub-task
    • Status: Resolved
    • Major
    • Resolution: Fixed
    • 1.0.0
    • 1.0.0
    • API / DataStream
    • None

    Description

      We should enhance the partitioned state with different state types, so that the system knows about the semantics of the State. I propose for now:

      • ValueState, this behaves like the current OperatorState: state is one value that can be set and retrieved
      • ListState, state is a list that can be appended to and iterated over
      • ReducingState, state is one value that other values can be added to

      ListState and ReducingState would share a common superclass to allow them to be used in the same places. For example, the WindowOperator would use ReducingState and ListState interchangeably, depending on whether we have a ReduceFunction or not.

      These additions allow the system to be clever about how state is checkpointed in the future. Think ManageMemory/Out-of-core state and incremental checkpoints.

      Also, state should be scoped to both a key and a namespace. This will allow the WindowOperator to use the interface. Right now, WindowOperator has a custom state implementation that uses a two-level Map (by key and by window). In this case the window would be the namespace.

      Attachments

        Activity

          People

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

            Dates

              Created:
              Updated:
              Resolved: