Versions Compared

Key

  • This line was added.
  • This line was removed.
  • Formatting was changed.

Status

...

Page properties


Discussion thread

...

JIRAwill create umbrella JIRA once the proposal is accepted

...


Motivation

With the current state registration interface, managed state (both operator and keyed state) can be lazily declared any time during processing. This poses problems in several dimensions for Flink’s state management capabilities:

...

  • redistributeMode: the redistribution scheme of this operator list state. For the initial version, we would not allow changing the used mode for previous state. Ideally, this can be changed freely depending on what redistribution scheme the user wishes to use for the current restore.

...


These annotations can be used at the operator-level or in rich UDFs. Briefly speaking, users' custom operators / UDFs should declare fields typed with the user-facing State types, and annotate them as either KeyedState or OperatorState.

...

Annotated state fields will also be automatically initialized during the StreamOperator#initializeState phase using Java reflection. The user is not required to access state via the RuntimeContext if the state was declared using state annotations. This should also enhance the perceived user experience, such that programming against Flink managed state is similar to manipulating a local variable.

(3) Deprecate existing

...

lazy state declaration interfaces

All existing lazy state declaration interfaces will be deprecated, and eventually removed (Flink version for removal TBD). This includes:

...