You are viewing a plain text version of this content. The canonical link for it is here.
Posted to user@flink.apache.org by 侯林蔚 <ti...@gmail.com> on 2016/09/26 10:47:49 UTC

can Flink use multi "addSink"?

hello,

I am a green hand  with Flink, and I want to build a topology with
streaming api  like this:

  datastream.fliter(new Myfilter()).addSink(new Mysink()).map(new
MyMap()).addSink(MySink2())

can Flink support operations like this?

Hope for your reply sincerely. thx.

Re: can Flink use multi "addSink"?

Posted by Gábor Gévay <gg...@gmail.com>.
Hello,

You can't call map on the sink, but instead you can continue from the
stream that you have just before the sink:

val stream = datastream.filter(new Myfilter())
val sink1 = stream.addSink(new Mysink())
val sink2 = stream.map(new MyMap()).addSink(MySink2())

Best,
Gábor



2016-09-26 12:47 GMT+02:00 侯林蔚 <ti...@gmail.com>:
> hello,
>
> I am a green hand  with Flink, and I want to build a topology with streaming
> api  like this:
>
>   datastream.fliter(new Myfilter()).addSink(new Mysink()).map(new
> MyMap()).addSink(MySink2())
>
> can Flink support operations like this?
>
> Hope for your reply sincerely. thx.