esper

Add Sensorevents to CEP Engine and get a list of all properties

被刻印的时光 ゝ 提交于 2021-02-11 14:22:45
问题 I want to build a CEP-Engine which is dynamic so you can add different event streams. As soon as a new stream is added, Esper should be able to read all the properties of the stream and put it into a list, for example. (For example integer id, long temperature, date timestamp etc.) Is this possible in Esper? Would be very grateful for any help 回答1: In order to add a stream at runtime you can use create-schema. create schema MyStream(id int, ...) For a stream that accepts events that an

Esper/NEsper EPL event Statement

让人想犯罪 __ 提交于 2021-01-29 07:26:57
问题 I'm new in Esper. Can anyone help me define the EPL statement to catch the event when the following situation occurs: Assumming that there are events with 3 attributes - (string)Symbol, (boolean)Value, (datetime)Timestamp. For example event1 (Symbol-apple, Value-true, Timestamp- 2020.10.07 14:00:00), event2 (Symbol-orange, Value-true, Timestamp- 2020.10.07 14:00:00) and event3 (Symbol-banana, Value-false, Timestamp- 2020.10.07 14:00:00). If they have same (or almost the same) Timestamp only

Add UNKNOWN eventstreams to CEP Engine and get a list of all properties (payload) of this event

微笑、不失礼 提交于 2021-01-07 02:35:28
问题 I want to be able to add event streams where I don't know beforehand what kind of properties the events have. So I don't know before if there is an integer ID or if there is a date timestamp and which payload might be there. As soon as I add such an unknown event, Esper should examine the stream and return the contained properties of the stream to me. 回答1: Thank you very much. That actually helps me a lot. But a function which returns all property names directly does not exist, does it? So I

Add UNKNOWN eventstreams to CEP Engine and get a list of all properties (payload) of this event

你离开我真会死。 提交于 2021-01-07 02:34:55
问题 I want to be able to add event streams where I don't know beforehand what kind of properties the events have. So I don't know before if there is an integer ID or if there is a date timestamp and which payload might be there. As soon as I add such an unknown event, Esper should examine the stream and return the contained properties of the stream to me. 回答1: Thank you very much. That actually helps me a lot. But a function which returns all property names directly does not exist, does it? So I

Esper statement to check, if A is followed by B without any other As in between

依然范特西╮ 提交于 2021-01-07 01:29:17
问题 I have the two events: A and B. Everytime A occurs, B have to occur afterwards without any As in between. Has anybody got an idea, how to implement this? I thought about something like pattern[every A -> A until B] But this statement is true, even if A is followed B without any other As in between. But it should only be true in case of AAB or AAAAB and so on.. Thank you for your help. 回答1: One possible solution is the pattern A -> (A and not B) Doing so the query is only true, when the rule

Esper loss-less events processing

萝らか妹 提交于 2020-01-16 16:48:18
问题 I'm evaluating Esper as a system for loss-less processing of billing data. It is expected that system can handle ~20000 events per second and run ~400 statements with continuos aggregation (without storing events in memory). In order to get expected performance I've started to send events in multiple threads and found that esper often looses data. Simple example that shows data loss import java.util.ArrayList; import java.util.Arrays; import java.util.Collections; import java.util.List;

Esper window usage: Recalculation based on event leaving window

本小妞迷上赌 提交于 2020-01-14 04:06:07
问题 I need somewhat like this. //Create a named window (w1) Create window w1.... //then insert events into window insert into w1.... select amount,..... from.... where... //remove from window on RemoveEventArrived as r Delete from w1 where w1.id = r.id Now insert into another event from w1 named window //inserting into final output event insert into derivedevent select sum(w.amount) from w1 as w suppose event sequence: 1. Event with id=1 and amount= 100 arrived. o/p of sum(amount) triggered and

Creating instances of Esper's epl

大兔子大兔子 提交于 2019-12-24 07:27:31
问题 I am playing around with Esper, learning how to use more advanced concepts. I have a program that fires mock stock events of 3 different stocks. I currently have a module with match_recognize pattern EPL that looks like this: module queries; import events.*; import configDemo.*; import annotations.*; create schema MyTickEvent as TickEvent; @Name('compareStocks') @Description('Compare the difference amount between two stocks') @Subscriber(className='configDemo.MySubscriber') select * from

How to describe this complex scene by cep?

喜夏-厌秋 提交于 2019-12-13 08:10:26
问题 This is my Event schema EventA (FieldA string, FieldB string, FiledC string) EventB (FieldD string, FieldE string) I want the query like: devide events into group window, group EventA by FieldA, FieldB ,group EventB by FieldE If events occured in this order: EventA -> EventA -> EventA -> EventB -> EventB ,and distinct( EventA.FieldC ) >= 3 ,and every EventB.FieldE equals every EventA.FieldB (join part),then generate a correlate event. The problem is that:the count of EventA (3) is for the

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