How do I achieve the same effect of Spark Streaming sliding window, which runs at X sliding interval over the last Y window length.
Looking at Esper, it should be win:time
and win:time_batch
, where win:time >= win:time_batch.
How do I achieve the same effect of Spark Streaming sliding window, which runs at X sliding interval over the last Y window length.
Looking at Esper, it should be win:time
and win:time_batch
, where win:time >= win:time_batch.
In esper the equivalent is to declare a context.
create context BucketOf10Sec start @now end after 10 seconds;
context BucketOf10Sec select sum(price) from MyEvent;
I managed to solve this problem in less customizable but easier way (at least for me), by using win:time
with OUTPUT EVERY x
SELECT value
FROM Entry.win:time(10 sec)
OUTPUT EVERY 5 sec
Works as I intended - every 5 seconds I get results from the last 10 seconds.