storm滑动窗口
Window滑动方式:
没有数据不滑动
windowLength:窗口的时间长度/tuple个数
slidingInterval:滑动的时间间隔/tuple个数
withWindow(Duration windowLength)
1.表示每个tuple滑动一次,滑动的窗口的时间长度是windowLength。
withWindow(Duration windowLength, Duration slidingInterval)
2.表示每隔slidingInterval时间,滑动窗口,滑动的窗口的时间长度是windowLength ,没有数据不滑动。
withWindow(Count windowLength, Count slidingInterval)
3.表示每隔slidingInterval的tuple数,滑动窗口,滑动的窗口的tuple个数是windowLength ,没有数据不滑动。
withWindow(Count windowLength)
4.表示每个tuple滑动一次,滑动的窗口的tuple个数是windowLength。
withWindow(Count windowLength, Duration slidingInterval)
5.表示每隔slidingInterval时间,滑动窗口,滑动的窗口的tuple个数是windowLength ,没有数据不滑动。
withWindow(Duration windowLength, Count slidingInterval)
6.表示每隔slidingInterval的tuple数,滑动窗口,滑动的窗口的时间长度是windowLength ,没有数据不滑动。
表示图:例如每5秒滑动一次,滑动窗口大小是10秒
........| e1 e2 | e3 e4 e5 e6 | e7 e8 e9 |...
-5 0 5 10 15 -> time
|<------- w1 -->|
|<---------- w2 ----->|
|<-------------- w3 ---->|
TumblingWindow滑动方式:
withTumblingWindow(BaseWindowedBolt.Count count)
1.表示间隔count个tuple数之后滑动一次窗口
withTumblingWindow(BaseWindowedBolt.Duration duration)
2.表示间隔时长duration之后滑动一次窗口
表示图:每5秒滑动一次窗口
| e1 e2 | e3 e4 e5 e6 | e7 e8 e9 |...
0 5 10 15 -> time
w1 w2 w3
最新文章
- BZOJ 3524: [Poi2014]Couriers [主席树]
- HDU 1052 Tian Ji -- The Horse Racing(贪心)(2004 Asia Regional Shanghai)
- 通过百度地图API将百度坐标转换成GPS经纬度
- 明晰三种常见存储技术:DAS、SAN和NAS
- gd库复制图片做水印
- 7.DropDownList的绑定
- 26_Json_Example
- hdu 4706 Children&#39;s Day 2013年ICPC热身赛A题 模拟
- 字节序转换与结构体位域(bit field)值的读取 Part 2 - 深入理解字节序和结构体位域存储方式
- Django web框架篇:基础
- 集合框架之Map接口
- SharePoint 2007 列表页定制--4个默认页定制
- SignalR学习笔记(三)Self-Host
- Ubuntu离线安装docker
- AHB协议整理 AMBA
- ProtoBuf3.3 安装记录
- Codeforces Round #541--1131F. Asya And Kittens(基础并查集)
- 福州大学软件工程1816 | W班 作业成绩排名汇总
- Chrome 屏蔽广告
- C++雾中风景10:聊聊左值,纯右值与将亡值
热门文章
- 3D数学基础_图形与游戏开发
- 如何禁止Chrome浏览器隐藏URL的WWW前缀
- Oracle中select 1和select *的区别
- vue——store全局存储
- Image Processing and Analysis_8_Edge Detection:Edge Detection Revisited ——2004
- MySQL表的修改
- rsync &; sersync 实时同步
- MOOC课程信息D3.js动态可视化
- C#在代码中编写输出debug信息-类Debug的使用
- 笔记本电脑安装jupyterthemes