- class AppendingState(*args, **kwds)[source]#
Base interface for partitioned state that supports adding elements and inspecting the current state. Elements can either be kept in a buffer (list-like) or aggregated into one value.
This state is accessed and modified by user functions, and checkpointed consistently by the system as part of the distributed snapshots.
The state is only accessible by functions applied on a KeyedStream. The key is automatically supplied by the system, so the function always sees the value mapped to the key of the current element. That way, the system can handle stream and state partitioning consistently together.
Adding the given value to the tail of this list state.
Removes the value mapped under the current key.
Returns the elements under the current key.