flink-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Sonex <kls.yan...@gmail.com>
Subject Re: 回复:Transfer information from one window to the next
Date Wed, 22 Feb 2017 12:51:56 GMT
I solved the state you were talking about.

The solution would like like this (similar to what you wrote):

stream.keyBy(...).timeWindow(...)
    .apply(new WindowFunction() {
        public void apply(K key, W window, Iterable<IN> elements,
Collector<OUT> out) {
            out.collect(new Tuple3<>(key, window, elements);
    })
    .keyBy(0)    // use the same key as the windows
    .mapWitState(...) // process the windows with shared information





--
View this message in context: http://apache-flink-user-mailing-list-archive.2336050.n4.nabble.com/Transfer-information-from-one-window-to-the-next-tp11738p11805.html
Sent from the Apache Flink User Mailing List archive. mailing list archive at Nabble.com.

Mime
View raw message