zoukankan      html  css  js  c++  java
  • 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
  • 相关阅读:
    centos7 安装redis服务及phpredis扩展
    centos7 LANMP 安装
    php reids 单机命令
    浅谈正向代理和反向代理
    php-fpm日志告警"seem busy"
    PHP-redis中文文档
    Nginx配置文件nginx.conf中文详解
    生成带参数的微信二维码
    微信临时二维码时为32位非0整型
    [Linux]Service mysql start出错(mysql: unrecognized service)解决方法
  • 原文地址:https://www.cnblogs.com/gavinYang/p/11198100.html
Copyright © 2011-2022 走看看