I hope you don't mind that I'm just lazily giving you a link to wikipedia
[1]. The first few examples all show manual DI with ctor, setters, etc.
Folks usually only think of assembling (automatic) DI when talking about DI
but you can build everything manually with a bit of inconvenience as well.
W
Just want to chime in here that it would be fantastic to have a way to DI
in Flink. Ideally the injected services themselves don't get serialized at
all since they're just singletons in our case. E.g. we have an API client
that looks up data from our API and caches it for all the functions that
nee
Hi Santhosh,
Flink does not support automatic DI on task level and there is no immediate
plan as of now to support it out-of-the-box. In general, there are quite a
few implications of using automatic DI in a distributed setting. For
example, how is a singleton supposed to work? Nevertheless, Flink
Stephan,
That would be helpful. On job manager side, entry class provides such an
entry point hook. The problem is on the task manager side, where we don't
have such an initialization/entry point.
I have brought up the same question 3 months ago in this list with subject
"entrypoint for executing
Would it help to be able to register "initializers", meaning some
classes/methods that will be called at every process entry point, to set up
something like this?
On Tue, Mar 13, 2018 at 7:56 PM, Steven Wu wrote:
> Xiaochuan,
>
> We are doing exactly as you described. We keep the injector as a
Xiaochuan,
We are doing exactly as you described. We keep the injector as a global
static var.
But we extend from FlinkJobManager and FlinkTaskManager to override main
method and initialize the injector (and other things) during JVM startup,
which does cause tight code coupling. It is a little pa