Skip to main content

🗓ī¸ 17012025 0114
📎

flink_window_assigners

Window assigners

Time based​

TypeDescription
TumblingFixed-size, non-overlapping windows > Each event belongs to exactly one window.
SlidingFixed-size windows that overlap > An event can belong to multiple windows.
SessionDynamically sized windows based on inactivity gaps between events
  • Have both event / processing time flavours
  • Tradeoffs
    • Processing:
      • 😃 Lower latency
      • ☚ī¸ Cannot correctly process historic data
      • ☚ī¸ Cannot handle out of order data
      • ☚ī¸ Non deterministic data

Count based​

TypeDescription
TumblingProcesses a fixed number of events before triggering (non-overlapping)
SlidingProcesses a fixed number of events with overlap
  • Windows will not fire until a batch is complete
  • No option to timeout / process a partial window (except with a custom trigger)

Global​

  • Assigns every event with the same key to the same global window
  • Useful for custom windowing, with a custom Trigger
NOTE

Apache flink suggests to use ProcessFunction instead


References