Hi,
Our stream is not based on time sequence and we do not use time based operations. we do want to clean the state after x days hence we fire timer event. My problem is that our unit test fires the event immediately (there is no ingestion time) how can I inject ingestion time ? Cheers Avi |
Hi Avi, do you use processing time timer (timerService().registerProcessingTimeTimer)? why do you need ingestion time? do you set TimeCharacteristic.IngestionTime? Best, Andrey On Tue, Mar 19, 2019 at 1:11 PM Avi Levi <[hidden email]> wrote:
|
Any idea what should I do to overcome this? On Wed, Mar 20, 2019 at 7:17 PM Avi Levi <[hidden email]> wrote:
|
Hi Avi, Just to verify your ITCase, I wrote the following dummy example and it seems to be "working" (ie. I can see non null timestamps and timers firing).
The source is: private static final class LongSource implements SourceFunction<Long> { Could you provide more details on how your usecase differs from the above dummy example so that we can pin down the problem? As a side-note, Ingestion time is essentially event time, with the only difference that the timestamp assigner in the beginning gives each element the timestamp System.currentTimeMillis. So in this case, maybe you could also consider setting event time timers but keep in mind then your Watermark emission interval. In addition, if you want to simply check processing time processing of you operator (not the whole pipeline), then you could make use of the OneInputStreamTaskTestHarness or its keyed variant. This allows you to provide your own processing time provider thus allow you to deterministically test processing time behaviour. Cheers, Kostas On Sat, Mar 23, 2019 at 9:32 AM Avi Levi <[hidden email]> wrote:
|
Thanks, I'll check it out. I got a bit confused with the Ingesting time equals to null in tests but all is ok now , I appreciate that On Mon, Mar 25, 2019 at 1:01 PM Kostas Kloudas <[hidden email]> wrote:
|
Hi Avi, Good to hear that! Cheers, Kostas On Mon, Mar 25, 2019 at 3:37 PM Avi Levi <[hidden email]> wrote:
|
Free forum by Nabble | Edit this page |