flink-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Robert Metzger <rmetz...@apache.org>
Subject Re: CoGgroup Operator Data Sink
Date Tue, 14 Apr 2015 09:27:24 GMT

you can write the output of a coGroup operator to two sinks:

------\           /---->Sink1
       \         /
       /        \
------/          \------>Sink2

You can actually write to as many sinks as you want.
Note that the data written to Sink1 and Sink2 will be identical.
If you want to write different data to S1 and S2, you can use a Tuple2
where the first field contains a tag, and the second field contains your
Then, you use a filter in front of your Sinks to select the data based on
the tag.

------\           /---(Filter)-->Sink1
       \         /
       /        \
------/          \----(Filter)-->Sink2

So the output of CoGroup could be Tuple2<Integer,YourPojo>, when the
integer is 1, it is only written by Sink1, when the integer is 2, its only
written by Sink2.

On Tue, Apr 14, 2015 at 10:20 AM, Mustafa Elbehery <
elbeherymustafa@gmail.com> wrote:

> Hi all,
> I wonder if the coGroup operator have the ability to sink two output
> simultaneously. I am trying to mock it by calling a function inside the
> operator, in which I sink the first output, and get the second output
> myself.
> I am not sure if this is the best way, and I would like to hear your
> suggestions,
> Regards.
> --
> Mustafa Elbehery
> EIT ICT Labs Master School <http://www.masterschool.eitictlabs.eu/home/>
> +49(0)15750363097
> skype: mustafaelbehery87

View raw message