cmccabe commented on code in PR #13116: URL: https://github.com/apache/kafka/pull/13116#discussion_r1127176224
########## core/src/main/scala/kafka/server/DynamicBrokerConfig.scala: ########## @@ -730,6 +744,45 @@ class DynamicThreadPool(server: KafkaBroker) extends BrokerReconfigurable { } } + def getValue(config: KafkaConfig, name: String): Int = { + name match { + case KafkaConfig.NumIoThreadsProp => config.numIoThreads + case KafkaConfig.NumReplicaFetchersProp => config.numReplicaFetchers + case KafkaConfig.NumRecoveryThreadsPerDataDirProp => config.numRecoveryThreadsPerDataDir + case KafkaConfig.BackgroundThreadsProp => config.backgroundThreads + case n => throw new IllegalStateException(s"Unexpected config $n") + } + } +} + +class ControllerDynamicThreadPool(controller: ControllerServer) extends BrokerReconfigurable { + + override def reconfigurableConfigs: Set[String] = { + DynamicThreadPool.ReconfigurableConfigs // common configs Review Comment: This is a small thing but, we probably shouldn't return `num.replica.fetchers`, `num.recovery.threads.per.data.dir`, and `background.threads` here, since they're not actually reconfigurable on the controller. We could still share most of the code here if we pass in the `ReconfigurableConfigs` `Set[String]` to `DynamicThreadPool.validateReconfiguration`, right? -- 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