Hi All,
I have developed a streaming pipeline in java and I need to pass some of the configuration parameters that are passed during program startup to user functions. I used the below link as reference. I have tried withParameters & setGlobalJobParameters but that doesn't seem to work. The parameters are blank inside my user function when deployed in a cluster. I have also tried passing the parameters inside the constructor of my user function and this seem to work on local but not in cluster mode, again the parameters are blank. Is there a recommended way to pass the program parameters to user function classes? Also, I have scenario where the state created inside a user function has to passed around to multiple classes. Is there a state registry or something from which I can retrieve a registered state and use or should I implement my own? Thanks in advance. Regards, Navneeth |
Hi Navneeth, the configuring user function using a Configuration object and setting the parameters in the open() method of a RichFunction is no longer recommended.However, you must make sure that the state is only accessed within function calls of the user function, i.e, you should not leak it to other operator through a singleton that holds state objects. 2017-10-26 16:54 GMT+02:00 Navneeth Krishnan <[hidden email]>:
|
Free forum by Nabble | Edit this page |