So my flatmap function processes input event which contain some domain specific value, and I need to keep track how much of this value has been processed with the invocations of the flatmap. Hence I am having a class variable which I then update whenever function is invoked, and set it to gauge. Each of my flatmap class has to achieve this, so I have maintained such a variable in each one of them and keep updating them.
On Fri, Jan 15, 2021 at 6:55 PM Arvid Heise <ar...@ververica.com> wrote: > Hi Manish, > > This approach sounds fishy. Shouldn't all instances of the function on the > same task manager then have the same value? > > Why do you need the variable? What's not working when updating the gauge > directly? > > On Fri, Jan 15, 2021 at 4:46 AM Manish G <manish.c.ghildi...@gmail.com> > wrote: > >> Hi All, >> >> I have few RichFlatMapFunction classes, and I have gauge added to each >> one of them. For a particular usecase I am updating these gauges >> incrementally. I have a class member variable in each of these classes >> which keeps increasing as flapMap function in these classes is called, and >> then I update corresponding gauge with this updated value. >> >> I observe that some of these gauges show almost exactly same graph in >> grafana. Can it be due to this approach? >> > > > -- > > Arvid Heise | Senior Java Developer > > <https://www.ververica.com/> > > Follow us @VervericaData > > -- > > Join Flink Forward <https://flink-forward.org/> - The Apache Flink > Conference > > Stream Processing | Event Driven | Real Time > > -- > > Ververica GmbH | Invalidenstrasse 115, 10115 Berlin, Germany > > -- > Ververica GmbH > Registered at Amtsgericht Charlottenburg: HRB 158244 B > Managing Directors: Timothy Alexander Steinert, Yip Park Tung Jason, Ji > (Toni) Cheng >