Hi,

We would like to adhere to clean code and expose all dependencies in the
constructor of the process functions

In flink, however, all dependencies passed to process functions must be
serializable. Another workaround is to instantiate these dependencies in
the open method of the process function and declare this dependency
transient

I wonder how, performance wise, would impact the performance of the job if
we declare all dependencies in the constructor and make them serializable.
Is this a wrong pattern to do? Has anybody run any experiment on
performance degradation of dependency exposed in the constructor vs
declaring it in the open method?

Thanks!
Oscar

Reply via email to