Esper epl语句实验
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语句实验的更多相关文章
- load data语句实验报告
1.创建和选择数据库 如果管理员在设置权限时为您创建数据库,则可以开始使用它.否则,您需要自己创建它: 创建数据库不会选择它来使用; 你必须明确地这样做.要创建menagerie当前数据库,请使用以下 ...
- 5分钟开启Esper之旅
原作者:CoffeeOneSugar 翻译:刘斌华 在我之前发表的文章中,我提到我最近热衷于Complex Event Processing (CEP) (复杂事件处理).简单来说,CEP把数据流作为 ...
- 复杂事件处理——Esper入门(示例程序)
前面对Esper Quick Start & Tutorial进行了简单描述,希望各位看官能够大致了解what is Esper,甚至对how to work有朦朦胧胧的了解. 开发一个Esp ...
- 复杂事件处理引擎—Esper 处理模型
1.esper的处理模型是持续性的——根据statement中事件流(event stream).视图(views).过滤器(filters)等的选择,esper引擎一旦处理事件数据,就会变更stat ...
- 复杂事件处理引擎—Esper入门(第二弹)
说明: 以下内容,可以参考Esper官方网站<Qucik start & Tutorial >(顺序做了部分调整). PS:因为英语水平有限(大学期间刚过CET4的英语小盲童一枚) ...
- 复杂事件处理引擎—Esper入门
说明: 以下内容,可以参考Esper官方网站<Qucik start & Tutorial >(顺序做了部分调整). PS:因为英语水平有限(大学期间刚过CET4的英语小盲童一枚) ...
- Esper学习之二:事件类型
Esper对事件有特殊的数据结构约定.能处理的事件结构有:POJO,java.util.Map,Object Array,XML 1.POJO 对于POJO,Esper要求对每一个私有属性要有gett ...
- Esper复杂事务处理一小时入门
来自小韩 什么是Esper 想要认识Esper,先要了解CEP(Complex Event Processing),到处都有,并且各方理解也有偏差,我就不赘述了. Esper就是CEP的一个java的 ...
- Esper——内存计算、事件驱动、SQL支持
教程简介Esper是一个事件流处理(ESP)和事件关联引擎(CEP的,复杂事件处理).Esper的目标是针对实时事件驱动架构(EDA).当Esper监测到事件流中又符合条件的时间发生时,即可触发Pla ...
随机推荐
- 实战小项目之IMX6 VPU使用
项目简介 基于官方的demo进行修改,限于能力问题,并没有将功能代码完全从官方的demo中分离出来,还是基于原来的框架进行修改,做了一些简单的封装,我做的工作如下: 使用自己的采集程序 定义6中工作模 ...
- 目前问题:plupload上传带参数到后台
目前问题:plupload上传带参数到后台,迟迟没有解决!!! 昨晚到23点多终于完成了! 直接上代码! var uploader = new plupload.Uploader({ //实例化一个p ...
- java.net.BindException: Permission denied
端口号报错: 解决办法:把端口号改为1000以上的,比如8080
- HDU——2089 不要62
不要62 Time Limit: 1000/1000 MS (Java/Others) Memory Limit: 32768/32768 K (Java/Others)Total Submis ...
- BZOJ 3931 网络吞吐量(最短路+拆点最大流)
3931: [CQOI2015]网络吞吐量 Time Limit: 10 Sec Memory Limit: 512 MB Submit: 1607 Solved: 652 [Submit][St ...
- BZOJ4737 组合数问题 【Lucas定理 + 数位dp】
题目 组合数C(n,m)表示的是从n个物品中选出m个物品的方案数.举个例子,从(1,2,3)三个物品中选择两个物品可以有( 1,2),(1,3),(2,3)这三种选择方法.根据组合数的定义,我们可以给 ...
- 使用caffe测试自己的图片
第一种方法是测试批量图片,使用caffe.bin即可,首先要做的是把你的jpg图片转换为LMDB的格式,如何转换呢?用/build/tools/convert_image --resize_width ...
- django学习——通过get_FOO_display 查找模型中的choice值
在django的models.py 中,我们定义了一些choices的元组,类似一些字典值,一般都是下拉框或者单多选框,例如 0对应男 1对应女等. class Area(models.Model): ...
- jackson 的UnrecognizedPropertyException错误
阅读更多 前段时间,使用jackson封装了json字符串转换为javabean的方法,代码如下: public static <T> T renderJson2Object(String ...
- request库
0x00 环境简介和安装 我这里使用的是python2.7版本,直接使用pycharm2018这款IDE. 首先在pycharm中配置一下virtualenv环境,virtualenv是一个创建独立 ...