我有一个元组:
public class mytuple
{
private int status;
private int userid;
private int location;
private int count1;
private int count2;
// corresponding getter settrs included.
}
我创建了两个 esper 语句 EPL:
select mytuple.userid as userid, sum(count1) as count1, sum(count2) as count2
from eventStream where mytuple.status = -1
group by userid, location;
and another EPL statement:
select mytuple.userid as userid, sum(count1) as count1, sum(count2) as count2
from eventStream where mytuple.status = 1
group by userid, location;
事件流在配置中注册。
我面临的问题是,在发送的两个事件中.. 一个作为状态 = -1,另一个作为状态 = +1,我在第一个 EPL 语句中得到 +2 的增量计数。
但是,如果只发送一个事件,则流可以完美运行。有什么我在这里想念的吗?
假设我对创建的 Esper 视图有一个单独的侦听器。