Re: Static Variables

2017-12-20 Thread Stefan Richter
:29 schrieb Navneeth Krishnan : > > Hi, > > I have a requirement to initialize few guava caches per jvm and some static > helper classes. I tried few options but nothing worked. Need some help. > Thanks a lot. > > 1. Operator level static variables: > > public stati

Static Variables

2017-12-19 Thread Navneeth Krishnan
Hi, I have a requirement to initialize few guava caches per jvm and some static helper classes. I tried few options but nothing worked. Need some help. Thanks a lot. 1. Operator level static variables: public static Cache loadingCache; public void open(Configuration parameters) throws

Re: Initialization of static variables

2016-06-23 Thread Flavio Pompermaier
Ok, thanks for the explanation Till! On Thu, Jun 23, 2016 at 3:19 PM, Till Rohrmann wrote: > Yes this is normal Flink behaviour. The reason is that static variables > are not transferred to the cluster. What happens instead when you first > load the class on the cluster is that t

Re: Initialization of static variables

2016-06-23 Thread Till Rohrmann
Yes this is normal Flink behaviour. The reason is that static variables are not transferred to the cluster. What happens instead when you first load the class on the cluster is that the static variables are created and possible class initializer are executed. That is also the reason why your

Initialization of static variables

2016-06-23 Thread Flavio Pompermaier
Hi all, I've a Flink job that initialize a static Map in the main program, before starting any Flink transformation. If I run the job locally that variable is not empty, running the job on the cluster reset that variable..is it a bug or am I doing something wrong? It only works if I initialize that