ivanyu commented on code in PR #13067: URL: https://github.com/apache/kafka/pull/13067#discussion_r1116205167
########## core/src/main/scala/kafka/log/LogSegment.scala: ########## @@ -689,6 +689,7 @@ object LogSegment { } } -object LogFlushStats extends KafkaMetricsGroup { - val logFlushTimer: Timer = newTimer("LogFlushRateAndTimeMs", TimeUnit.MILLISECONDS, TimeUnit.SECONDS) +object LogFlushStats { + private val metricsGroup = new KafkaMetricsGroup(this.getClass) Review Comment: Since it's an object without the class, `classOf` won't work. I replaced with `LogFlushStats.getClass` here and in other similar places you mentioned. ########## core/src/main/scala/kafka/log/LogSegment.scala: ########## @@ -689,6 +689,7 @@ object LogSegment { } } -object LogFlushStats extends KafkaMetricsGroup { - val logFlushTimer: Timer = newTimer("LogFlushRateAndTimeMs", TimeUnit.MILLISECONDS, TimeUnit.SECONDS) +object LogFlushStats { + private val metricsGroup = new KafkaMetricsGroup(this.getClass) Review Comment: Since it's an object without the class, `classOf` won't work. I replaced with `LogFlushStats.getClass` here and in other similar places you mentioned. Makes sense? -- 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: jira-unsubscr...@kafka.apache.org For queries about this service, please contact Infrastructure at: us...@infra.apache.org