Hello,
I have a stateless Flink job that processes incoming stream as follows:* For a 
specific key, an event is produced every 10 sec.* Every 60 sec, the event is 
acted upon (the event is modified, enriched).  What is important is the event 
gets acted upon every 60 second.
* Upon job restart, it is ok if the processor ends up modifying an event twice 
in a 60 second window, as this would be an infrequent occurance.
Based on the above requirements, I feel a stateless processor where I keep 
track of current Processing time when to modify an event would suffice.  In 
Map(), I could use something like "Instans.now()" to get current time.  
However, that limits my Unit testing, as I am not able to modify the processing 
time.  Is there an option where I can modify the "processing time" for stateles 
processor?
I developed a different stateful processer where KeyedProcessFunction was 
extended.  In that case, the "Context" was passed to the processElement() 
method, in which I was able to get the current procesing time using the method 
- ctx.timerService().getCurrentProcessingTime().  I was able to modify the 
processing time from the test harness, which allowed unit testing of the 
Processor.  I am looking for something similar for the stateless processor.
Any pointers or link to sample code would be greatly appreciated.
Regards,Ahmed.

Reply via email to