flink-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Aljoscha Krettek <aljos...@apache.org>
Subject Re: The way to itearte instances in AllWindowFunction in current Master branch
Date Thu, 25 Feb 2016 11:29:52 GMT
Hi Hung,
you are right, the generic parameters of AllWindowFunction changed from Iterable<IN>
to IN. However, in the apply function on AllWindowedStream the parameter changed from IN to
Iterable<IN>.

What this means is that you can still do:

windowed.apply(new MyIterableWindowFunction())

and iterate over the elements in the window.

I hope that helps but please let me know if I should go into more details.

Cheers,
Aljoscha
> On 25 Feb 2016, at 11:16, HungChang <unicorn.banachi@gmail.com> wrote:
> 
> Hi,
> 
> I would like to iterate all the instances in windows (count the events in
> the windows and show the time range of windows).
> 
> in 0.10.2 there is AllWindowFunction that can be used to iterate tuples.
> public interface AllWindowFunction<IN, OUT, W extends Window> extends
> Function, Serializable {
>    void apply(W var1, Iterable<IN> var2, Collector<OUT> var3) throws
> Exception;
> }
> 
> In the current master branch AllWindowFunction now it's not able to iterate. 
> https://github.com/apache/flink/blob/master/flink-streaming-java/src/main/java/org/apache/flink/streaming/api/functions/windowing/ReduceIterableAllWindowFunction.java
> 
> Can I ask what would be current the way to iterate the instances in windows?
> I saw there are ReduceAllWindowFunction and ReduceIterableAllWindowFunction
> but they are @internal.
> 
> Best,
> 
> Hung
> 
> 
> 
> --
> View this message in context: http://apache-flink-user-mailing-list-archive.2336050.n4.nabble.com/The-way-to-itearte-instances-in-AllWindowFunction-in-current-Master-branch-tp5137.html
> Sent from the Apache Flink User Mailing List archive. mailing list archive at Nabble.com.


Mime
View raw message