You are viewing a plain text version of this content. The canonical link for it is here.
Posted to user@flink.apache.org by Manish G <ma...@gmail.com> on 2021/01/15 03:45:37 UTC

Gauges generating same graph

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?

Re: Gauges generating same graph

Posted by Manish G <ma...@gmail.com>.
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 <ma...@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
>

Re: Gauges generating same graph

Posted by Arvid Heise <ar...@ververica.com>.
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 <ma...@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