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语句实验相关推荐
- Esper epl语句详解
EPL,Event Process Language,事件处理语言.类似于SQL,描述了esper要分析的内容. 统计窗口 以下为常用窗口. win:length(size)//攒够size条数据后触 ...
- c语言if语句习题,大学c语言if switch for 语句实验四练习题
大学c语言if switch for 语句实验四练习题 实验四 [实验目的] 1. 熟悉和掌握if.switch的使用方法:学会编写简单的分支程序结构. 2. 熟悉for语句的一般形式,学会编写简单的 ...
- JAVA2实验3分支与循环语句,实验3控制语句:分支、循环.doc
实验3控制语句:分支.循环 实验3 控制语句:分支.循环 一.实验目的 1.掌握 Java表达式语句与复合语句使用方法. 2. 理解 Java 程序语法结构,掌握顺序结构.选择结构的程序设计方法. 3 ...
- python基本语句实验心得_总算领会python语言学习心得
python虽然好学,但是也要是付出努力之后,学懂了才会觉得好学,如果你没有动力,没有付出时间和精力,那对于你来说就是多好学也是非常的困难的!如何找到学习python的动力呢?以下是小编为你整理的py ...
- shell 编程条件语句实验
一*,shell 编程条件语句* 要使 Shell 脚本程序具备一定的"智能",面临的第一个问题就是如何区分不同的情况以确定执行何种操作. Shell 环境根据命令执行后的返回状态 ...
- mysql基本语句实验二 修改表的结构-- 1、修改数据库-- 修改实验一中创建的学生管理数据库studentmanager的字符集为gbk。
-- 1.修改数据库 -- 修改实验一中创建的学生管理数据库studentmanager的字符集为gbk. alter database studentmanager DEFAULT CHARACTE ...
- Esper学习笔记三:EPL语法(1)
2019独角兽企业重金招聘Python工程师标准>>> 1.EPL语法简介 EPL全称Event Processing Language,是一种类似SQL的语言,包含了SELECT, ...
- Java第二次作业|实验3 运算符、表达式和语句
Java第二次作业|实验3 运算符.表达式和语句 实验目的:理解运算符的优先级,掌握运算符与表达式,控制语句 题目集 1.用for循环输出俄文的"字母表",每个字母表输出占2列 / ...
- C语言实验03_判断语句
C语言实验03_判断语句 实验03(01)求分段函数的值 题目描述 有一函数如下: 当 x<1 时,y 的值为:lgx; 当 1=<x<6 时,y 的值为:(2x+3)的 1/2 次 ...
最新文章
- ISC2015听会小计
- mysql内置乐观锁吗_mysql 乐观锁详解
- C# 泛型编程学习总结
- boost::coroutine2模块实现分段的stack的测试程序
- 信息学奥赛C++语言: 将字符串中的小写字母转换成大写字母
- python需要下载哪些软件-学python下载什么软件开发
- 1003 我要通过! (20 分)—PAT (Basic Level) Practice (中文)
- 如何移除照片中不需要的东西?这三款Mac App软件不会让你失望!
- atom对比 vscode_Atom、Sublime Text、VSCode 三者比较
- 软件oem要注意什么_软件开发需要注意什么
- [圣诞大礼][android控]平板电脑HD精品游戏软件合集
- 餐饮业进销存软件哪个好用?推荐这十款
- 盘点机PDA搭配蓝牙便携打印机,条码标签打印,超市仓库条码管理,条码标签纸
- 2022年江苏省高职单招(数学)考试冲刺试题及答案
- 猫盘plus开启ssh登录
- PS网页版在线使用PS网站源码
- JavaScript中的常用鼠标事件以及小天使图片拖拽
- 联盟决策大会 By K龙
- etal斜体吗 参考文献_参考文献方面毕业论文格式模板,与文下载****北京化工大学学报相关论文下载...
- APM一些疑难故障的处理