You are viewing a plain text version of this content. The canonical link for it is here.
Posted to user@flink.apache.org by Ishwara Varnasi <iv...@gmail.com> on 2018/01/29 14:33:20 UTC

Scheduled/timed source/sink

What is the best way to add timer to a source/sink? (Apologies if I’m asking the question that’s already being answered elsewhere), also is it possible to use process function as source or sink?
Thanks
Ishwara


Re: Scheduled/timed source/sink

Posted by Chesnay Schepler <ch...@apache.org>.
AFAIK Flink's source/sink interface do not expose something akin to the 
ProcessFunction's TimerService,
so I would suggest to use an ScheduledExecutorService or similar.

Technically you can use process functions as sources, the easiest way 
being to create a dummy source which broadcasts a single value and apply 
a process function which then creates the timers,
but IMO you're better off going with a plain SourceFunction.

On 29.01.2018 15:33, Ishwara Varnasi wrote:
> What is the best way to add timer to a source/sink? (Apologies if I’m asking the question that’s already being answered elsewhere), also is it possible to use process function as source or sink?
> Thanks
> Ishwara
>
>