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

最新文章

  1. BZOJ 3524: [Poi2014]Couriers [主席树]
  2. HDU 1052 Tian Ji -- The Horse Racing(贪心)(2004 Asia Regional Shanghai)
  3. 通过百度地图API将百度坐标转换成GPS经纬度
  4. 明晰三种常见存储技术:DAS、SAN和NAS
  5. gd库复制图片做水印
  6. 7.DropDownList的绑定
  7. 26_Json_Example
  8. hdu 4706 Children&#39;s Day 2013年ICPC热身赛A题 模拟
  9. 字节序转换与结构体位域(bit field)值的读取 Part 2 - 深入理解字节序和结构体位域存储方式
  10. Django web框架篇:基础
  11. 集合框架之Map接口
  12. SharePoint 2007 列表页定制--4个默认页定制
  13. SignalR学习笔记(三)Self-Host
  14. Ubuntu离线安装docker
  15. AHB协议整理 AMBA
  16. ProtoBuf3.3 安装记录
  17. Codeforces Round #541--1131F. Asya And Kittens(基础并查集)
  18. 福州大学软件工程1816 | W班 作业成绩排名汇总
  19. Chrome 屏蔽广告
  20. C++雾中风景10:聊聊左值,纯右值与将亡值

热门文章

  1. 3D数学基础_图形与游戏开发
  2. 如何禁止Chrome浏览器隐藏URL的WWW前缀
  3. Oracle中select 1和select *的区别
  4. vue——store全局存储
  5. Image Processing and Analysis_8_Edge Detection:Edge Detection Revisited ——2004
  6. MySQL表的修改
  7. rsync &amp; sersync 实时同步
  8. MOOC课程信息D3.js动态可视化
  9. C#在代码中编写输出debug信息-类Debug的使用
  10. 笔记本电脑安装jupyterthemes