Skip to main content
Ctrl+K
PyFlink 1.20+vvr.11.7.dev0 documentation - Home PyFlink 1.20+vvr.11.7.dev0 documentation - Home
  • API Reference
  • Examples
  • API Reference
  • Examples

Section Navigation

  • PyFlink Table
  • PyFlink DataStream
    • StreamExecutionEnvironment
    • DataStream
    • Functions
    • State
    • Timer
    • Window
    • Checkpoint
    • Side Outputs
    • Asynchronous I/O
    • Connectors
    • Formats
  • PyFlink DataFrame
  • PyFlink Common
  • API Reference
  • PyFlink DataStream
  • State
  • pyflink.datastream.state.ReducingState

pyflink.datastream.state.ReducingState#

class ReducingState[source]#

State interface for reducing state. Elements can be added to the state, they will be combined using a reduce function. The current state can be inspected.

The 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.

Methods

add(value)

Adding the given value to the tail of this list state.

clear()

Removes the value mapped under the current key.

get()

Returns the elements under the current key.

previous

pyflink.datastream.state.MergingState

next

pyflink.datastream.state.AggregatingState

On this page
  • ReducingState

This Page

  • Show Source

Created using Sphinx 7.4.7.

Built with the PyData Sphinx Theme 0.16.1.