Skip to content

Commit

Permalink
KAFKA-17491: Move BrokerServerMetrics to server module (#17114)
Browse files Browse the repository at this point in the history
Reviewers: Mickael Maison <[email protected]>
  • Loading branch information
wernerdv authored Sep 10, 2024
1 parent beacf48 commit af8d058
Show file tree
Hide file tree
Showing 5 changed files with 305 additions and 284 deletions.
5 changes: 2 additions & 3 deletions core/src/main/scala/kafka/server/SharedServer.scala
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,6 @@ package kafka.server

import kafka.raft.KafkaRaftManager
import kafka.server.Server.MetricsPrefix
import kafka.server.metadata.BrokerServerMetrics
import kafka.utils.{CoreUtils, Logging}
import org.apache.kafka.common.metrics.Metrics
import org.apache.kafka.common.network.ListenerName
Expand All @@ -37,7 +36,7 @@ import org.apache.kafka.raft.Endpoints
import org.apache.kafka.server.ProcessRole
import org.apache.kafka.server.common.ApiMessageAndVersion
import org.apache.kafka.server.fault.{FaultHandler, LoggingFaultHandler, ProcessTerminatingFaultHandler}
import org.apache.kafka.server.metrics.KafkaYammerMetrics
import org.apache.kafka.server.metrics.{BrokerServerMetrics, KafkaYammerMetrics}

import java.net.InetSocketAddress
import java.util.Arrays
Expand Down Expand Up @@ -267,7 +266,7 @@ class SharedServer(
sharedServerConfig.dynamicConfig.initialize(zkClientOpt = None, clientMetricsReceiverPluginOpt = None)

if (sharedServerConfig.processRoles.contains(ProcessRole.BrokerRole)) {
brokerMetrics = BrokerServerMetrics(metrics)
brokerMetrics = new BrokerServerMetrics(metrics)
}
if (sharedServerConfig.processRoles.contains(ProcessRole.ControllerRole)) {
controllerServerMetrics = new ControllerMetadataMetrics(Optional.of(KafkaYammerMetrics.defaultRegistry()))
Expand Down
150 changes: 0 additions & 150 deletions core/src/main/scala/kafka/server/metadata/BrokerServerMetrics.scala

This file was deleted.

This file was deleted.

Loading

0 comments on commit af8d058

Please sign in to comment.