how to implement for the statement of time batch / length window?

220 views
Skip to first unread message

Kidong Lee

unread,
Aug 7, 2012, 4:24:55 AM8/7/12
to siddh...@googlegroups.com
hi,

I have used to Esper CEP, but because of license problem of Esper, I should see the alternative, and I found Siddhi cep.

To make statement for time batch or length window, in Esper, it looks something like this:
..
SELECT eventType AS eventType, event AS event FROM mykidong.example.udp.esper.EventWrapper.win:time_length_batch(2 sec, 50000)
..

I have tried to get some examples about that from siddhi, but I have not found yet.
Could anybody show me how to make statement for time batch and length window?
Or show me some example codes for that.

Cheers,

Kidong Lee.


suho

unread,
Aug 7, 2012, 4:39:13 AM8/7/12
to siddh...@googlegroups.com


On Tuesday, August 7, 2012 1:54:55 PM UTC+5:30, Kidong Lee wrote:
hi,

I have used to Esper CEP, but because of license problem of Esper, I should see the alternative, and I found Siddhi cep.

To make statement for time batch or length window, in Esper, it looks something like this:
..
SELECT eventType AS eventType, event AS event FROM mykidong.example.udp.esper.EventWrapper.win:time_length_batch(2 sec, 50000)

In siddhi we still don't have timeLength window, the implementation is trivial you just need to extend org.wso2.siddhi.core.query.stream.handler.window.WindowHandler.
For now your class has to be in the same package ( org.wso2.siddhi.core.query.stream.handler.window) compile the class and add to the classpath
If your class name is "CustomTimeLenghtWindowHandler" then your query will look like;

from SampleStream#window.customTimeLenght(2000,50000)
inset into outStream;

Suho


suho

unread,
Aug 7, 2012, 4:44:20 AM8/7/12
to siddh...@googlegroups.com

Siddhi is very much lacking in documentation, we are looking forward to fix this issue ASAP,
for the time being go through  the quick-start sample and the test cases

Suho
Cheers,

Kidong Lee.


Kidong Lee

unread,
Aug 8, 2012, 9:57:36 AM8/8/12
to siddh...@googlegroups.com
Thank you for your reply, suho.

As you mentioned, My CustomTimeBatchLengthWindowHandler extends WindowHandler, but I have no idea what to do further more anything.
Could you give me some concrete implementation codes of this handler?

In addition to this issue, I have tested #window.timeBatch(xxx) and #window.length(xxx) for my test stream, but It seems not to work correctly.
I have looked around the test cases from the sources codes, but I have not found such tests about time batch and length window.

- Kidong.




2012년 8월 7일 화요일 오후 5시 39분 13초 UTC+9, suho 님의 말:
Reply all
Reply to author
Forward
0 new messages