|
View:
New views
3 Messages
—
Rating Filter:
Alert me
|
|
|
Using time_accum with groupbyHi,
We are thinking of using Esper to process website usage against particular sessions. We want to process this usage only after we know the session has expired (say, after 30 minutes). The usage, including the session key, appears on a queue, which Esper will be reading from. So, we'd like to capture all events for a given session key, but only after 30 minutes of inactivity. We started out writing a simple test case, processing a number of events with one of two session keys. This is the query: select * from SessionUsageEvent.std:groupby(sessionKey).win:time_accum(10 seconds) Our listener seems to be called on every event. We'd expect the listener only to be called twice, once per session key, and not until after 10 seconds. We'd also like the EventBean to contain all events for that session key - we're not trying to do aggregation. Are we doing something wrong? Is Esper appropriate for this use case? Thanks Rhys ------------------------------------------------------------------------------------------------------------ This email (and any attachment) is confidential, may be legally privileged and is intended solely for the use of the individual or entity to whom it is addressed. If you are not the intended recipient please do not disclose, copy or take any action in reliance on it. If you have received this message in error please tell us by reply and delete all copies on your system. Although this email has been scanned for viruses you should rely on your own virus check as the sender accepts no liability for any damage arising out of any bug or virus infection. Please note that email traffic data may be monitored and that emails may be viewed for security reasons. John Wiley & Sons Limited is a private limited company registered in England with registered number 641132. Registered office address: The Atrium, Southern Gate, Chichester, West Sussex, PO19 8SQ. ------------------------------------------------------------------------------------------------------------ --------------------------------------------------------------------- To unsubscribe from this list, please visit: http://xircles.codehaus.org/manage_email |
|
|
Re: Using time_accum with groupbyHi
win:time_accum posts its accumulated events into its remove event stream so you'd have to write (http://esper.codehaus.org/esper-3.2.0/doc/reference/en/html/epl-views.html#view-win-time-accumulating) select rstream * from SessionUsageEvent.std:groupby(sessionKey).win:time_accum(10 seconds) If you want to get the entire batch after a 30min inactivity you might want to use win:time_accum(30 minutes) with the drawback of possibly accumulating more events that you can possibly hold if considered for all possible sessions. Might be worth looking at something like select rstream * from SessionUsageEvent(sessionKey=theSessionKeyYouWantToLookAt).win:time_accum(30 minutes) Alex On Mon, Sep 21, 2009 at 5:28 PM, Keepence, Rhys - Ealing <rkeepence@...> wrote: Hi, |
|
|
RE: Using time_accum with groupbyThanks Alex, that did the job!
We're quite impressed with Esper, we went from knowing nothing to a working prototype in around a day. Cheers Rhys ------------------------------------------------------------------------------------------------------------ This email (and any attachment) is confidential, may be legally privileged and is intended solely for the use of the individual or entity to whom it is addressed. If you are not the intended recipient please do not disclose, copy or take any action in reliance on it. If you have received this message in error please tell us by reply and delete all copies on your system. Although this email has been scanned for viruses you should rely on your own virus check as the sender accepts no liability for any damage arising out of any bug or virus infection. Please note that email traffic data may be monitored and that emails may be viewed for security reasons. John Wiley & Sons Limited is a private limited company registered in England with registered number 641132. Registered office address: The Atrium, Southern Gate, Chichester, West Sussex, PO19 8SQ. ------------------------------------------------------------------------------------------------------------ --------------------------------------------------------------------- To unsubscribe from this list, please visit: http://xircles.codehaus.org/manage_email |
| Free embeddable forum powered by Nabble | Forum Help |