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
  • 相关阅读:
    php测试题整理(0519)
    Ajax调用返回json,xml数据类型(0517--pm)
    python 收集测试日志--格式
    python3下tomorow模块报语法错误def async(n, base_type, timeout=None): ^ SyntaxError: invalid syntax
    appium 下载
    VMware 虚拟机设置固定ip
    Centos7 安装配置 SVN
    【Linux】 Centos7 安装 mysql-8.0
    win7 SP1 64位 原版 百度网盘下载
    win10操作系统 64位 原版 百度网盘下载
  • 原文地址:https://www.cnblogs.com/gavinYang/p/11198100.html
Copyright © 2011-2022 走看看