SteNicholas commented on code in PR #3419:
URL: https://github.com/apache/celeborn/pull/3419#discussion_r2489361172
##########
common/src/main/scala/org/apache/celeborn/common/rpc/netty/Inbox.scala:
##########
@@ -282,6 +282,7 @@ private[celeborn] class Inbox(
stopped = true
addMessage(OnStop)
metrics.dump()
+ metrics.close()
Review Comment:
Why not invoke `close` in finnaly blocker?
##########
common/src/main/scala/org/apache/celeborn/common/metrics/source/AbstractSource.scala:
##########
@@ -183,6 +183,15 @@ abstract class AbstractSource(conf: CelebornConf, role:
String)
})
}
+ def removeTimer(name: String): Unit = removeTimer(name, Map.empty[String,
String])
+
+ def removeTimer(name: String, labels: Map[String, String]): Unit = {
+ val metricNameWithLabel = metricNameWithCustomizedLabels(name, labels)
+ if (metricRegistry.getTimers.containsKey(metricNameWithLabel)) {
Review Comment:
Why not remove metricNameWithLabel from metricRegistry? Then, it's
unnecessary to remove metricNameWithLabel from namedTimers after checking.
--
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.
To unsubscribe, e-mail: [email protected]
For queries about this service, please contact Infrastructure at:
[email protected]