Watermark on connected stream

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

Watermark on connected stream

Kien Truong
Hi,

If I connect two stream with different watermark, how are the watermark
of the resulting stream determined ?


Best regards,

Kien

Reply | Threaded
Open this post in threaded view
|

Re: Watermark on connected stream

Piotr Nowojski
Hi,

As you can see in org.apache.flink.streaming.api.operators.AbstractStreamOperator#processWatermark1 it takes a minimum of both of the inputs.

Piotrek
 

> On 19 Oct 2017, at 14:06, Kien Truong <[hidden email]> wrote:
>
> Hi,
>
> If I connect two stream with different watermark, how are the watermark of the resulting stream determined ?
>
>
> Best regards,
>
> Kien
>

Reply | Threaded
Open this post in threaded view
|

Re: Watermark on connected stream

Tzu-Li (Gordon) Tai
In reply to this post by Kien Truong
Hi Kien,

The watermark of an operator with multiple inputs will be determined by the current minimum watermark across all inputs.

Cheers,
Gordon


On 19 October 2017 at 8:06:11 PM, Kien Truong ([hidden email]) wrote:

Hi, 

If I connect two stream with different watermark, how are the watermark 
of the resulting stream determined ? 


Best regards, 

Kien 
Reply | Threaded
Open this post in threaded view
|

Re: Watermark on connected stream

Tzu-Li (Gordon) Tai
Ah, sorry for the duplicate answer, I didn’t see Piotr’s reply. Slight delay on the mail client.


On 19 October 2017 at 11:05:01 PM, Tzu-Li (Gordon) Tai ([hidden email]) wrote:

Hi Kien,

The watermark of an operator with multiple inputs will be determined by the current minimum watermark across all inputs.

Cheers,
Gordon


On 19 October 2017 at 8:06:11 PM, Kien Truong ([hidden email]) wrote:

Hi, 

If I connect two stream with different watermark, how are the watermark 
of the resulting stream determined ? 


Best regards, 

Kien 
Reply | Threaded
Open this post in threaded view
|

Re: Watermark on connected stream

aitozi
In reply to this post by Kien Truong
Hi,

You can see the field in AbstractStreamOperator

// We keep track of watermarks from both inputs, the combined input is the
minimum
// Once the minimum advances we emit a new watermark for downstream
operators
private long combinedWatermark = Long.MIN_VALUE;

it will chose the Min watermark from the connect stream



--
Sent from: http://apache-flink-user-mailing-list-archive.2336050.n4.nabble.com/
Reply | Threaded
Open this post in threaded view
|

Re: Watermark on connected stream

Piotr Nowojski
In reply to this post by Tzu-Li (Gordon) Tai
With aitozi we have a hat trick oO
 
On 19 Oct 2017, at 17:08, Tzu-Li (Gordon) Tai <[hidden email]> wrote:

Ah, sorry for the duplicate answer, I didn’t see Piotr’s reply. Slight delay on the mail client.


On 19 October 2017 at 11:05:01 PM, Tzu-Li (Gordon) Tai ([hidden email]) wrote:

Hi Kien,

The watermark of an operator with multiple inputs will be determined by the current minimum watermark across all inputs.

Cheers,
Gordon


On 19 October 2017 at 8:06:11 PM, Kien Truong ([hidden email]) wrote:

Hi, 

If I connect two stream with different watermark, how are the watermark 
of the resulting stream determined ? 


Best regards, 

Kien