Re: 回复:Transfer information from one window to the next

2017-02-22 Thread Sonex
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 elements,
Collector 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.


Re: 回复:Transfer information from one window to the next

2017-02-20 Thread Sonex
I don`t think you understood the question correctly. I do not care about
information between windows at the same time (i.e., start of window = 0, end
of window 3600). I want to pass a variable, let`s say for key 1, from the
apply function of window 0-3600 to the apply function of window 3600-7200,
for key 1.



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