mimaison commented on code in PR #16108:
URL: https://github.com/apache/kafka/pull/16108#discussion_r1617715372


##########
core/src/main/java/kafka/server/builders/KafkaApisBuilder.java:
##########
@@ -179,7 +179,7 @@ public KafkaApis build() {
         if (metrics == null) throw new RuntimeException("You must set 
metrics");
         if (quotas == null) throw new RuntimeException("You must set quotas");
         if (fetchManager == null) throw new RuntimeException("You must set 
fetchManager");
-        if (brokerTopicStats == null) brokerTopicStats = new 
BrokerTopicStats(Optional.of(config));
+        if (brokerTopicStats == null) brokerTopicStats = new 
BrokerTopicStats(config.remoteLogManagerConfig().enableRemoteStorageSystem());

Review Comment:
   Yes we can use that. Thanks for the suggestion!
   
   I see we both methods in different files, it would probably make sense to 
stick to one and be consistent. I'll keep this PR focused on removing the 
KafkaConfig dependency, we can follow up with another PR to do the cleanup.



-- 
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]

Reply via email to