flink-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Navneeth Krishnan <reachnavnee...@gmail.com>
Subject Process Function
Date Tue, 05 Sep 2017 04:49:49 GMT
Hi All,

I have a streaming pipeline which is keyed by userid and then to a flatmap
function. I need to clear the state after sometime and I was looking at
process function for it.

Inside the process element function if I register a timer wouldn't it
create a timer for each incoming message?

// schedule the next timer 60 seconds from the current event time
        ctx.timerService().registerEventTimeTimer(current.timestamp + 60000);

How can I get something like a clean up task that runs every 2 mins and
evicts all stale data? Also is there a way to get the key inside onTimer
function so that I know which key has to be evicted?


View raw message