i try read data into a list or List[Map] to store the T2,but i think if use list or List[Map],there is not parallelization,so i want to use coGroup.
other hand,the coGroup function is join the T1 and T2,and must have window and trigger method,the window is cut the T1 and T2, the trigger is trigger the apply function when input to the trigger threshold. from the result,in apply(), i use my InnerJoinFunction,and output the T1 and T2,we can see when input data,and trigger the apply,into the InnerJoinFunction,the T1 and T2 will output, the T1 is increase,and T2 is not change, so the window cut the T1 and T2 do not achieve mine goal,so i want to write my "GlobalWindows.create()". and Flink's operator state i have no ideal for it,and really do not know how to use it.can you give me a example. ----- 原始邮件 ----- 发件人:Timo Walther <[hidden email]> 收件人:[hidden email] 主题:Re: modify coGroup GlobalWindows GlobalWindow 日期:2016年09月06日 17点52分 Hi,
will words2 always remain constant? If yes, you don't have to create a stream out of it and coGroup it, but you could simply pass the collection to Map/FlatMap function and do the joining there without the need of a window. Btw. you know that non-keyed global windows do not scale? If I understand your code correctly, you just want to get a stream with the last T2, right? I don't think you have to implement your own "GlobalWindow" for that. Have you tried to use Flink's operator state for that? So that if the state is growing it can be written to disk. Hope that helps. Timo Am 06/09/16 um 10:05 schrieb [hidden email]:
-- Freundliche Grüße / Kind Regards Timo Walther Follow me: @twalthr https://www.linkedin.com/in/twalthr |
I think you have to rethink your
approach. In your example "words2" is a stream but only with a
fixed set of elements. If all elements of "words2" have been
processed, the right side of your coGroup will always be empty no
matter what is incoming in your socketTextStream.
It is not read in over and over again. Is that your intention? Am 06/09/16 um 13:15 schrieb [hidden email]: i try read data into a list or List[Map] to store the T2,but i think if use list or List[Map],there is not parallelization,so i want to use coGroup.
-- Freundliche Grüße / Kind Regards Timo Walther Follow me: @twalthr https://www.linkedin.com/in/twalthr |
Free forum by Nabble | Edit this page |