Sliding window

Fixed-sized, overlapping window analytic function support

Objective

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. Every window has at least one event. Events can belong to more than one sliding window.

Time based windows

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

Attributes schema

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

Event count based windows

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

Attributes schema

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

Last updated