Hi! It seems that you want to filter some record out before they go into the window. So why not filter them before applying the window?
Dario Heinisch <dario.heini...@gmail.com> 于2021年8月10日周二 下午6:26写道: > Hey there, > > So I have a stream of data, let the stream be a_1, a_2, a_3, a_4, a_5. > Now I would like to have a sliding window which slides by 1 second and > takes the data of 1 second. But here comes the caveat: > > - I only want to keep the data in the window that does not have matching > elements. > > So the pipeline looks as following: > > <SOURCE> > .keyBy() > .window(CustomSlidingWindow.of()) > .process(new ComplexMatcher()) > .addSink(new PersistMatches()) > > In `ComplexMatcher` I will check whether some of the elements match. All > the elements that match should not remain in the window even if their > timestamp would fit into the window. > > So to sum it up: > > - SlidingWindow > - Elements that have been matched should not remain in the window even > if their timestamp would fit > - Multiple elements can be one `Match`, so 2 or 3 or 10 elements can > form a single match. > > Could anyone point me into the right direction? Is that even possible > with window & process or would I have to use a different approach? > > Best regards, > > Dario > >