- class SlidingEventTimeWindows(size: int, slide: int, offset: int)[source]#
A WindowAssigner that windows elements into sliding windows based on the timestamp of the elements. 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, key_type=Types.STRING()) \ ... .window(SlidingEventTimeWindows.of(Time.minutes(1), Time.seconds(10)))
assign_windows(element, timestamp, context)
- param element
The element to which windows should be assigned.
- param env
The StreamExecutionEnvironment used to compile the DataStream job.
A TypeSerializer for serializing windows that are assigned by this WindowAssigner.
True if elements are assigned to windows based on event time, false otherwise.
of(size, slide[, offset])
Creates a new
WindowAssignerthat assigns elements to time windows based on the element timestamp and offset.