Hi Dian Thank you for your explanation. After have a look at the source code, the cep within just executes by a time interval according to each state. Thank you.
Yours sincerely Joshua On Wed, Sep 18, 2019 at 9:41 AM Dian Fu <dian0511...@gmail.com> wrote: > Hi Joshua, > > There is no tumbling/sliding window underlying the cep within > implementation. > > The difference between datastream window and cep within is that: > 1) Regarding to datastream window, the window is unified for all the > elements (You can think that the window already exists before the input > elements come). For example, for sliding window: (window size: 60s, slide > size: 10s), then the windows will be [0s, 60s], [10s, 70s], [20s, 80s], > etc. When the input elements come, they are put into the windows they > belong to. > 2) Regarding to cep within, it defines the maximum time interval for an > event sequence to match the pattern. So a unified window is not suitable > for this requirement. Regarding to the underlying implementation, for each > matching/partial-matching sequence, the time interval between the first > element and the last element of the sequence will be checked against the > within interval. You can refer to [1] for details. > > Regards, > Dian > > [1] > https://github.com/apache/flink/blob/459fd929399ad6c80535255eefa278564ec33683/flink-libraries/flink-cep/src/main/java/org/apache/flink/cep/nfa/NFA.java#L251 > > > 在 2019年9月17日,下午7:47,Joshua Fan <joshuafat...@gmail.com> 写道: > > Hi All, > > I'd like to know the difference between data stream window function and > cep within, I googled this issue but found no useful information. > > Below the cep within, is there a tumbling window or sliding window or just > a process function? > > Your explanation will be truly appreciated. > > Yours sincerely > > Joshua > > >