In which case the StreamNode has multiple output edges?

classic Classic list List threaded Threaded
4 messages Options
Reply | Threaded
Open this post in threaded view
|

In which case the StreamNode has multiple output edges?

徐涛
Hi All,
        I am reading the source code of flink, when I read the StreamGraph generate part, I found that there is a property named outEdges in StreamNode. I know there is a case a StreamNode has multiple inEdges, but in which case the StreamNode has multiple outEdges?
        Thanks a lot.

Best
Henry
Reply | Threaded
Open this post in threaded view
|

Re: In which case the StreamNode has multiple output edges?

vino yang
Hi tao,

The Dataflow abstraction of Flink runtime is a DAG. In a graph, there may be more than one in-edge and one out-edge. 
A simple example of multiple out margins is that an operator is followed by multiple sinks. 
For example, a sink to kafka and a sink to elasticsearch.

Thanks, vino.

徐涛 <[hidden email]> 于2018年9月18日周二 上午10:34写道:
Hi All,
        I am reading the source code of flink, when I read the StreamGraph generate part, I found that there is a property named outEdges in StreamNode. I know there is a case a StreamNode has multiple inEdges, but in which case the StreamNode has multiple outEdges?
        Thanks a lot.

Best
Henry
Reply | Threaded
Open this post in threaded view
|

Re: In which case the StreamNode has multiple output edges?

Fabian Hueske-2
Hi,

Any operator can have multiple out-going edges.
If you implement something like:

DataStream<X> instream = ...

DataStream<Y> outstream1 = instream.map(new MapFunc1());
DataStream<Z> outstream2 = instream.map(new MapFunc2());

The node representing instream will have two outgoing edges that lead to the two Map nodes.

Best, Fabian


2018-09-18 5:25 GMT+02:00 vino yang <[hidden email]>:
Hi tao,

The Dataflow abstraction of Flink runtime is a DAG. In a graph, there may be more than one in-edge and one out-edge. 
A simple example of multiple out margins is that an operator is followed by multiple sinks. 
For example, a sink to kafka and a sink to elasticsearch.

Thanks, vino.

徐涛 <[hidden email]> 于2018年9月18日周二 上午10:34写道:
Hi All,
        I am reading the source code of flink, when I read the StreamGraph generate part, I found that there is a property named outEdges in StreamNode. I know there is a case a StreamNode has multiple inEdges, but in which case the StreamNode has multiple outEdges?
        Thanks a lot.

Best
Henry

Reply | Threaded
Open this post in threaded view
|

Re: In which case the StreamNode has multiple output edges?

徐涛
Hi Fabian,
I realized that scenario later :)
Thank you all the same.

Best
Henry


在 2018年9月18日,下午4:10,Fabian Hueske <[hidden email]> 写道:

Hi,

Any operator can have multiple out-going edges.
If you implement something like:

DataStream<X> instream = ...

DataStream<Y> outstream1 = instream.map(new MapFunc1());
DataStream<Z> outstream2 = instream.map(new MapFunc2());

The node representing instream will have two outgoing edges that lead to the two Map nodes.

Best, Fabian


2018-09-18 5:25 GMT+02:00 vino yang <[hidden email]>:
Hi tao,

The Dataflow abstraction of Flink runtime is a DAG. In a graph, there may be more than one in-edge and one out-edge. 
A simple example of multiple out margins is that an operator is followed by multiple sinks. 
For example, a sink to kafka and a sink to elasticsearch.

Thanks, vino.

徐涛 <[hidden email]> 于2018年9月18日周二 上午10:34写道:
Hi All,
        I am reading the source code of flink, when I read the StreamGraph generate part, I found that there is a property named outEdges in StreamNode. I know there is a case a StreamNode has multiple inEdges, but in which case the StreamNode has multiple outEdges?
        Thanks a lot.

Best
Henry