mimaison commented on code in PR #20672:
URL: https://github.com/apache/kafka/pull/20672#discussion_r2468651841
##########
core/src/test/scala/unit/kafka/server/DynamicBrokerConfigTest.scala:
##########
@@ -1086,3 +1126,50 @@ class TestDynamicThreadPool extends BrokerReconfigurable
{
assertEquals(100, newConfig.backgroundThreads)
}
}
+
+class TestExporterOnly extends MetricsReporter with
ClientTelemetryExporterProvider {
+ override def configure(configs: util.Map[String, _]): Unit = {}
+ override def init(metrics: util.List[KafkaMetric]): Unit = {}
+ override def metricChange(metric: KafkaMetric): Unit = {}
+ override def metricRemoval(metric: KafkaMetric): Unit = {}
+ override def close(): Unit = {}
+
+ override def clientTelemetryExporter(): ClientTelemetryExporter = new
ClientTelemetryExporter {
+ override def exportMetrics(context: ClientTelemetryContext,
+ payload: ClientTelemetryPayload): Unit = {}
+ }
Review Comment:
This can be slightly simplified into
```
override def clientTelemetryExporter(): ClientTelemetryExporter = (context:
ClientTelemetryContext, payload: ClientTelemetryPayload) => {}
```
same for the other `exportMetrics() method below
--
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]