flink-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Fabian Hueske <fhue...@gmail.com>
Subject Re: Question about processElement(...) and onTimer(...) in ProcessFunction
Date Tue, 14 Mar 2017 08:30:26 GMT
Hi Yassine,

as far as I know, the processElement() and onTimer() methods are not
concurrently called.
This is definitely true for event-time timers (they are triggered by
watermarks which are internally handled as records) and I'm pretty sure
that the behavior is the same for processing time timers.
@Kostas (in CC) please correct me if I'm wrong here.

Best, Fabian

2017-03-14 8:04 GMT+01:00 Yassine MARZOUGUI <y.marzougui@mindlytix.com>:

> Hi all,
>
> In ProcessFuction, does processElement() still get called on incoming
> elements when onTimer() is called, or are elements buffered until onTimer()
> returns?
> I am wondering because both processElement() and onTimer() can access and
> manipulate the state, so if for example state.clear() is called at the end
> of onTimer() is there a risk that a state update by processElement() that
> happened during the onTimer() call get cleared? Thank you in advance.
>
> Best,
> Yassine
>

Mime
View raw message