flink-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Satish Chandra Gupta <scgupt...@gmail.com>
Subject Best way of doing some global initialization
Date Thu, 03 Nov 2016 08:26:39 GMT

I need to do set/initialize some config of a framework/util that is used in
my Flink stream processing app. Basically, a piece of code that needs to be
executed exactly once before anything else. Clearly doing it in the main
flink processor function will not suffice, as apart from the client, the
same needs to be done on other node before topology is executed.

I have gone through Flink best practices
and one way I can think about it to check whether init has been done in the
open() all Rich Functions, and if not then call the initialization code.
But that seems to be "right", basically to add any operator, I must do this
initillazation call boilerplate code.

Is there anyway to define a global initializations in Flink, or to define
an operator that is guaranteed to be called the first thing on all nodes?


View raw message