pyflink.datastream.functions.KeyedProcessFunction#
- class KeyedProcessFunction[source]#
A keyed function processes elements of a stream.
For every element in the input stream, process_element() is invoked. This can produce zero or more elements as output. Implementations can also query the time and set timers through the provided Context. For firing timers on_timer() will be invoked. This can again produce zero or more elements as output and register further timers.
Note that access to keyed state and timers (which are also scoped to a key) is only available if the KeyedProcessFunction is applied on a KeyedStream.
Methods
close
()on_timer
(timestamp, ctx)Called when a timer set using TimerService fires.
open
(runtime_context)process_element
(value, ctx)Process one element from the input stream.