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 ...
随机推荐
- Unity 脚本<2>
UnityEngine; using System.Collections; public class PlayerControl : MonoBehaviour { [HideInInspector ...
- [cocos2dx UI] CCLabelAtlas 为什么不显示最后一个字
CClabelAtlas优点,基本用法等我就不说了,这里说一个和美术配合时的一个坑!就是图片的最后一位怎么也不显示,如下图中的冒号不会显示 查了ASCII码表,这个冒号的值为58,就是在9(57)的后 ...
- 个人环境搭建——ANT安装
ANT安装 ant的安装有两种方式: 第一种,手动安装 (1)首先需要在Apache官网下载最新版的Ant,下载地址为:http://ant.apache.org/bindownload.cgi ...
- 关于getAttribute()和setAttribute()的总结
继续声明:欲练其功,必先自宫.博主正处在自宫阶段,修炼得道者多多指教. 最近在看<JavaScript DOM 编程艺术>这本书,看到了getAttribute()和setAttribut ...
- 关于Delphi cxGrid主从表中从表只能编辑第一条记录的问题
在Delphi cxGrid主从表中从表只能编辑第一条记录,这个问题是由于设置主从关联字段错误造成的. 从表DBtableView2的keyfieldnames,DetailKeyFieldNames ...
- 【HDOJ5510】Bazinga(KMP)
题意:给定n个由小写字母组成的字符串,第i个字符串为a[i],求最大的j满足存在1<=i<j,a[i]不是a[j]的子串,无解输出-1 T<=50,n<=500,len[i]& ...
- spring一些总结
Spring中三种实例化bean的方法: 1)使用类构造器 <bean id="orderService" class="cn.itcast.OrderServ ...
- mdev的基本工作原理【转】
转自:http://www.cnblogs.com/hnrainll/archive/2011/06/10/2077435.html 分析过mdev(udev的BusyBox简化版)源码的都知道mde ...
- flashcache 介绍
rpm: flashcache-utils-0.0-4.1.el6.x86_64 kmod-flashcache-0.0-3.el6.x86_64 基本介绍: Flashcache是Facebook技 ...
- jenkins 中 violation使用pylint
在jenkins中无法打开源码问题: 1. 在 Report Violations的 Source encoding 设置为 项目文件的编码, 如: utf-8. 缺省是 default. 2. 在 ...