Excerpt |
---|
|
Siddhi Inbuilt windows in wiki format |
Following are the supported inbuilt windows of Siddhi
time
<event> time (<int|long|time>
windowTime)
- Extension Type: Window
- Description: Sliding time window, that holds events for that arrived during last windowTime period, and gets updated on every event arrival and expiry.
- Parameter: windowTime: The sliding time period for which the window should hold events.
- Return Type: Return current and expired events.
- Examples:
time(20)
for processing events arrived in last 20 milliseconds. time(2 min)
for processing events arrived in last 2 minutes.
timeBatch
<event> timeBatch (<int|long|time>
windowTime)
- Extension Type: Window
- Description: Batch (tumbling) time window, that holds events arrived between windowTime periods, and gets updated for every windowTime.
- Parameter: windowTime: The batch time period for which the window should hold events.
- Return Type: Return current and expired events.
- Examples:
timeBatch(20)
for processing events arrived every 20 milliseconds. time(2 min)
for processing events arrived every 2 minutes.
length
<event> length (<int>
windowLength)
- Extension Type: Window
- Description: Sliding length window, that holds last windowLength events, and gets updated on every event arrival and expiry.
- Parameter: windowLength : The number of events that need to should be in a sliding length window.
- Return Type: Return current and expired events.
- Examples:
length(10)
for processing last 10 events. time(200)
for processing last 200 events.
lengthBatch
<event> lengthBatch (<int>
windowLength)
- Extension Type: Window
- Description: Batch (tumbling) length window, that holds up to windowLength events, and gets updated on every windowLength event arrival.
- Parameter: windowLength : For the number of events the window should tumble.
- Return Type: Return current and expired events.
- Examples:
lengthBatch(10)
for processing 10 events as a batch. time(200)
for processing 200 events as a batch.
externalTime
<event> time (<long> timestamp, <int|long|time>
windowTime)
- Extension Type: Window
- Description: Sliding time window based on external time, that holds events for that arrived during last windowTime period from the external timestamp, and gets updated on every monotonically increasing timestamp.
- Parameter: timestamp : The time which the window determines as current time and will act upon, the value of this parameter should be monotonically increasing.
- Parameter: windowTime: The sliding time period for which the window should hold events.
- Return Type: Return current and expired events.
Examples: externalTime(eventTime,20)
for processing events arrived in last 20 milliseconds from the eventTime. externalTime(eventTimestamp, 2 min)
for processing events arrived in last 2 minutes from eventTimestamp.
Excerpt |
---|
|
To do: add other window types |