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,

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

2017-02-21 Thread Sonex
Hi and thank you for your response, is it possible to give me a simple example? How can I put the variable into a state and then access the state to the next apply function? I am new to flink. Thank you. -- View this message in context:

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

2017-02-20 Thread 施晓罡(星罡)
the function with the obtained variable. Regards,Xiaogang --发件人:Sonex <kls.yan...@gmail.com>发送时间:2017年2月20日(星期一) 19:54收件人:user <user@flink.apache.org>主 题:Re: 回复:Transfer information from one window to the next I don`t think yo

回复:Transfer information from one window to the next

2017-02-20 Thread 施晓罡(星罡)
Hi sonex I think you can accomplish it by using a PassThroughFunction as the apply function and processing the elements in a rich flatMap function followed.  You can keep the information in the flatmap function (via states) so that they can be shared among different windows. The program may