Esper - detect event after absence

 ̄綄美尐妖づ 提交于 2019-12-13 07:17:07

问题


I found out that it is possible to detect the absence of an event using for example: select * from pattern [every EventX -> (timer:interval(10 sec) and not EventX)], but is it also possible to detect the presence of an event after it was absent? Using prior perhaps? And is it possible to use one statement for detecting both absence and presence? Thanks in advance!


回答1:


Its sounds like you are looking for this

every EventX -> (timer:interval(10 sec) and not EventX) -> Event X

...adding some time interval withing which the event should arrive...

every EventX -> (timer:interval(10 sec) and not EventX) -> Event X where timer:within(10)

Try an outer join to detect with multiple patterns:

select * from pattern[...].win:length_batch(1) as pattern1 full outer join pattern[...].win:length_batch(1) as pattern2


来源:https://stackoverflow.com/questions/38426151/esper-detect-event-after-absence

标签
易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!