Re: Creating singleton objects per task manager

2020-04-07 Thread Seth Wiesman
Hi Kristoff, You are correct that, that was a typo :) At most one instance per slot. Seth > On Apr 7, 2020, at 9:41 AM, KristoffSC wrote: > > Hi Seth, > I would like to piggyback on this question :) > > You wrote: > "I would strongly encourage you to create one instance of your object per

Re: Creating singleton objects per task manager

2020-04-07 Thread KristoffSC
Hi Seth, I would like to piggyback on this question :) You wrote: "I would strongly encourage you to create one instance of your object per ProcessFunction, inside of open. That would be one instance per slot which is not equal to the parallelism of your operator." Especially the second part "Tha

Re: Creating singleton objects per task manager

2020-04-07 Thread Salva Alcántara
Thanks a lot Seth! -- Sent from: http://apache-flink-user-mailing-list-archive.2336050.n4.nabble.com/

Re: Creating singleton objects per task manager

2020-04-06 Thread Seth Wiesman
Hi Salva, One TaskManager == One JVM. There is nothing Flink specific here, you can just create a singleton how you would in any other JVM application. But be careful, if your singleton does any sort of locking/coordination it will quickly become the bottleneck in your application. I would strongl

Creating singleton objects per task manager

2020-04-06 Thread Salva Alcántara
I need to create a singleton (manager) object to be used within all the parallel instances of my UDF operator (a `ProcessFunction`). What is the proper way of creating such a singleton object per task manager? -- Sent from: http://apache-flink-user-mailing-list-archive.2336050.n4.nabble.com/