flink-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Gaurav Luthra <gauravluthra6...@gmail.com>
Subject Re: Counter Metrics not getting removed from Flink GUI after close()
Date Tue, 08 Jan 2019 16:24:18 GMT
Hi Chesnay,

If removing the metrics is not possible from Flink GUI, while the job is
Then kindly tell me how to update a metric counter.

Suppose I created a metric Counter with key "chesnay" and incremented the
counter to 20, by code mentioned below.

/Note: I am not assigning this counter to any local/member variable as I do
not want to keep state in my job./

Now, after some time, If I want to update the value of "chesnay" metric
counter to 60 and I am not aware about the old state (which is 20).

So, If I do getRuntimeContext().getMetricGroup().counter("chesnay").inc(60);

Event then Flink GUI shows value 20 for "chesnay" metric Group. and gives a
WARN log something like this, "same name can be used, and behavior is

Now, how to update the "chesnay" metric Group if I do not want to keep the
state in my Job???

Thats why, I though of creating user scoped metric group and thought of
closing that group to remove the metric counters and create new metrics
every time, when I want to update it.

Hope you understood my problem.

Sent from: http://apache-flink-user-mailing-list-archive.2336050.n4.nabble.com/

View raw message