pyflink.datastream.window.TumblingProcessingTimeWindows#
- class TumblingProcessingTimeWindows(size: int, offset: int)[source]#
A WindowAssigner that windows elements into windows based on the current system time of the machine the operation is running on. Windows cannot 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(TumblingProcessingTimeWindows.of(Time.minutes(1), Time.seconds(10)))
Methods
assign_windows
(element, timestamp, context)- param element
The element to which windows should be assigned.
get_default_trigger
(env)- param env
The StreamExecutionEnvironment used to compile the DataStream job.
get_window_serializer
()- return
A TypeSerializer for serializing windows that are assigned by this WindowAssigner.
is_event_time
()- return
True if elements are assigned to windows based on event time, false otherwise.
of
(size[, offset])Creates a new
TumblingProcessingTimeWindows
WindowAssigner
that assigns elements to time windows based on the element timestamp and offset.