Sliding

Sliding windows, unlike Tumbling windows, output events only for points in time when the content of the window actually changes. In other words, when an event enters or exits the window. So, every window has at least one event. Note events can belong to more than one sliding window.

Time based attributes

AttributeDescriptionData TypeRequired

window size

Size of window with respect to timeUnit

Long

slide

Time interval to shift in to next window

Long

time unit

TimeUnit used for configuring window trigger. Supported types:

  • NANOSECONDS

  • MICROSECONDS

  • MILLISECONDS

  • SECONDS

  • MINUTES

  • HOURS

  • DAYS

TimeUnit

Default: MILLISECONDS

Example

Configures a sliding time based window with a size of 10 seconds.

time window:
  emitting type: pageFailures
  policy:
    type: slidingTime
    window size: 10
    time unit: SECONDS

Count based attributes

AttributeDescriptionData TypeRequired

window size

Maximum number of events before triggering window processing

Long

slide

Number of latest events to shift in to the next window

Long

Example

Configures a sliding window with a maximum of 1000 events with a slide size of 300

time window:
  emitting type: pageFailures
  policy:
    type: slidingCount
    window size: 1000
    slide: 300

Last updated