基础代码见下,下文列举的实验都是在此程序基础上改动。


all,snapshot,first

String epl = "select * from appTable.win:time(5 sec) output all every 2 seconds";
能够看到。输出时将事件从队列中移除。 已经输出的下次不再输出。 ================
newEventName:appTable name:0 age:0
newEventName:appTable name:1 age:1
================
newEventName:appTable name:2 age:2
newEventName:appTable name:3 age:3
================
newEventName:appTable name:4 age:4
newEventName:appTable name:5 age:5
================
String epl = "select * from appTable.win:time(5 sec) output snapshot every 2 seconds";
输出的是快照,事件不从队列中移除。
================
newEventName:appTable name:0 age:0
newEventName:appTable name:1 age:1
newEventName:appTable name:2 age:2
================
newEventName:appTable name:0 age:0
newEventName:appTable name:1 age:1
newEventName:appTable name:2 age:2
newEventName:appTable name:3 age:3
newEventName:appTable name:4 age:4
================
newEventName:appTable name:2 age:2
newEventName:appTable name:3 age:3
newEventName:appTable name:4 age:4
newEventName:appTable name:5 age:5
================
String epl = "select * from appTable.win:time(5 sec) output first every 2 seconds";
仅仅输出进入窗体的第一条数据。 ================
newEventName:appTable name:0 age:0
================
newEventName:appTable name:3 age:3
================
newEventName:appTable name:5 age:5
================
newEventName:appTable name:7 age:7
================

insert前后的时间窗体

String epl2 = "insert into appTable2 select t.id as id, t.price as price from appTable.win:time(5 sec) as t output all every 1 seconds";
String epl3 = "select * from appTable2.win:time(5 sec) output all every 5 seconds";
为epl3配置监听。
能够看到。第一个5秒就有输出。 第1秒
第2秒
第3秒
第4秒
第5秒
newEventName:appTable2 name:0 age:0
newEventName:appTable2 name:1 age:1
newEventName:appTable2 name:2 age:2
newEventName:appTable2 name:3 age:3
newEventName:appTable2 name:4 age:4
================
第6秒
第7秒
第8秒
第9秒
第10秒
newEventName:appTable2 name:5 age:5
newEventName:appTable2 name:6 age:6
newEventName:appTable2 name:7 age:7
newEventName:appTable2 name:8 age:8
newEventName:appTable2 name:9 age:9
================
第11秒

String epl2 = "insert into appTable2 select t.id as id, t.price as price from appTable.win:time(5 sec) as t output all every 5 seconds";
String epl3 = "select * from appTable2.win:time(5 sec) output all every 5 seconds";
为epl3配置监听。
能够看到,第二个5秒才有输出。 第1秒
第2秒
第3秒
第4秒
第5秒
第6秒
第7秒
第8秒
第9秒
newEventName:appTable2 name:0 age:0
newEventName:appTable2 name:1 age:1
newEventName:appTable2 name:2 age:2
newEventName:appTable2 name:3 age:3
newEventName:appTable2 name:4 age:4
================
第10秒
第11秒

Esper epl语句实验的更多相关文章

  1. load data语句实验报告

    1.创建和选择数据库 如果管理员在设置权限时为您创建数据库,则可以开始使用它.否则,您需要自己创建它: 创建数据库不会选择它来使用; 你必须明确地这样做.要创建menagerie当前数据库,请使用以下 ...

  2. 5分钟开启Esper之旅

    原作者:CoffeeOneSugar 翻译:刘斌华 在我之前发表的文章中,我提到我最近热衷于Complex Event Processing (CEP) (复杂事件处理).简单来说,CEP把数据流作为 ...

  3. 复杂事件处理——Esper入门(示例程序)

    前面对Esper Quick Start & Tutorial进行了简单描述,希望各位看官能够大致了解what is Esper,甚至对how to work有朦朦胧胧的了解. 开发一个Esp ...

  4. 复杂事件处理引擎—Esper 处理模型

    1.esper的处理模型是持续性的——根据statement中事件流(event stream).视图(views).过滤器(filters)等的选择,esper引擎一旦处理事件数据,就会变更stat ...

  5. 复杂事件处理引擎—Esper入门(第二弹)

    说明: 以下内容,可以参考Esper官方网站<Qucik start & Tutorial >(顺序做了部分调整). PS:因为英语水平有限(大学期间刚过CET4的英语小盲童一枚) ...

  6. 复杂事件处理引擎—Esper入门

    说明: 以下内容,可以参考Esper官方网站<Qucik start & Tutorial >(顺序做了部分调整). PS:因为英语水平有限(大学期间刚过CET4的英语小盲童一枚) ...

  7. Esper学习之二:事件类型

    Esper对事件有特殊的数据结构约定.能处理的事件结构有:POJO,java.util.Map,Object Array,XML 1.POJO 对于POJO,Esper要求对每一个私有属性要有gett ...

  8. Esper复杂事务处理一小时入门

    来自小韩 什么是Esper 想要认识Esper,先要了解CEP(Complex Event Processing),到处都有,并且各方理解也有偏差,我就不赘述了. Esper就是CEP的一个java的 ...

  9. Esper——内存计算、事件驱动、SQL支持

    教程简介Esper是一个事件流处理(ESP)和事件关联引擎(CEP的,复杂事件处理).Esper的目标是针对实时事件驱动架构(EDA).当Esper监测到事件流中又符合条件的时间发生时,即可触发Pla ...

随机推荐

  1. java主要集合类的数据结构学习

    http://www.cnblogs.com/beanmoon/archive/2012/11/22/2782442.html 在程序中,集合类每天都在使用,以致于某些代码充斥着List和Map,一直 ...

  2. AngularJs之HelloWorld

    <!DOCTYPE html> <html lang="en" ng-app> <head> <meta charset="UT ...

  3. 【bzoj3944/bzoj4805】Sum/欧拉函数求和 杜教筛

    bzoj3944 题目描述 输入 一共T+1行 第1行为数据组数T(T<=10) 第2~T+1行每行一个非负整数N,代表一组询问 输出 一共T行,每行两个用空格分隔的数ans1,ans2 样例输 ...

  4. Codeforces Round #364 (Div. 2) A 水

    A. Cards time limit per test 1 second memory limit per test 256 megabytes input standard input outpu ...

  5. Codeforces Round #320 (Div. 2) [Bayan Thanks-Round] D 数学+(前缀 后缀 预处理)

    D. "Or" Game time limit per test 2 seconds memory limit per test 256 megabytes input stand ...

  6. eclspse魔板

    window->prefence->搜索 template即可

  7. hdu 1503 最长公共子序列

    /* 给两个串a,b.输出一个最短的串(含等于a的子序列且含等于b的子序列) */ #include <iostream> #include <cstdio> #include ...

  8. 多核cpu的特殊中断

    cpu可以向其他cpu发送中断,也可以向单独某一个cpu发送中断 每个 cpu 都有一个时钟中断源

  9. 牛客挑战赛14-F细胞

    https://www.nowcoder.com/acm/contest/81/F 循环卷积的裸题,太久没做FFT了,这么裸的循环卷积都看不出来 注意一下本文的mod 都是指表示幂的模数,而不是NTT ...

  10. golang xorm reverse 自动生成数据库实体文件

    一.先安装好需要的东西 xorm 也可以参考官方文档 readme.md https://github.com/go-xorm/cmd 和 http://xorm.io/docs/ go get gi ...