prateekm commented on a change in pull request #1223: SAMZA-2397: Updating
gauge-val function on newGauge on same metric name
URL: https://github.com/apache/samza/pull/1223#discussion_r369169865
##########
File path:
samza-core/src/main/scala/org/apache/samza/metrics/MetricsRegistryMap.scala
##########
@@ -50,8 +52,10 @@ class MetricsRegistryMap(val name: String) extends
ReadableMetricsRegistry with
}
def newGauge[T](group: String, gauge: Gauge[T]) = {
- debug("Adding new gauge %s %s %s." format (group, gauge.getName, gauge))
- putAndGetGroup(group).putIfAbsent(gauge.getName, gauge)
+ if (putAndGetGroup(group).containsKey(gauge.getName)) {
+ info("Updating existing gauge %s %s %s" format (group, gauge.getName,
gauge))
Review comment:
Should be debug.
----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
For queries about this service, please contact Infrastructure at:
[email protected]
With regards,
Apache Git Services