pyflink.datastream.window.SlidingProcessingTimeWindows#
- class SlidingProcessingTimeWindows(size: int, slide: int, offset: int)[source]#
A WindowAssigner that windows elements into sliding windows based on the current system time of the machine the operation is running on. Windows can possibly overlap.
For example, in order to window into windows of 1 minute, every 10 seconds:
>>> data_stream.key_by(lambda x: x[0], key_type=Types.STRING()) \ ... .window(SlidingProcessingTimeWindows.of(Time.minutes(1), Time.seconds(10)))
Methods
assign_windows(element, timestamp, context)get_default_trigger(env)get_window_serializer()is_event_time()of(size, slide[, offset])Creates a new
SlidingProcessingTimeWindowsWindowAssignerthat assigns elements to time windows based on the element timestamp and offset.