Yes, Mans. You can use both processing-time and event-time timers if you set the time characteristic to event-time. They'll be triggered by their own time semantics, separately. (actually there’s no watermark for processing time)
Cheers, Xingcan > On Jul 9, 2019, at 11:40 AM, M Singh <mans2si...@yahoo.com> wrote: > > Thanks Yun for your answers. > > Does this mean that we can use processing and event timers (in processors or > triggers) regardless of the time characteristic ? Also, is possible to use > both together and will they both fire at the appropriate watermarks for > processing and event times ? > > Mans > > On Tuesday, July 9, 2019, 12:18:30 AM EDT, Yun Gao <yungao...@aliyun.com> > wrote: > > > Hi, > For the three questions, > 1. The processing time timer will be trigger. IMO you may think the > processing time timer as in parallel with the event time timer. They are > processed separately underlying. The processing time timer will be triggered > according to the realistic time. > 2. I'am not very clear on how to changed later in the application. Do you > mean call `StreamExecutionEnvironment#setStreamTimeCharacteristics` multiple > times ? If so, then the last call will take effect for all the operators > before or after the last call, since the setting will only take effect in > `StreamExecutionEnvironment#execute`. > 3. 'assignTimeStampAndWatermark' will change the timestamp of the record. > IMO you may think each record contains a timestamp field, and the filed is > set when ingesting, but 'assignTimeStampAndWatermark' will change the value > of this field, so the following operators relying on the timestamp will see > the updated value. > > Best, > Yun > > > > ------------------------------------------------------------------ > From:M Singh <mans2si...@yahoo.com> > Send Time:2019 Jul. 9 (Tue.) 09:42 > To:User <user@flink.apache.org> > Subject:Apache Flink - Relation between stream time characteristic and timer > triggers > > Hi: > > I have a few questions about the stream time characteristics: > > 1. If the time characteristic is set to TimeCharacteristic.EventTime, but the > timers in a processor or trigger is set using registerProcessingTimeTimer (or > vice versa), then will that timer fire ? > > 2. Once the time character is set on the stream environment, and changed > later in the application, which one is applied, the first one or the last one > ? > > 3. If the stream time characteristic is set to IngestionTime, then is there > any adverse effect of assigning the timestamp using > assignTimeStampAndWatermark to a stream later in the application ? > > Thanks >