akhileshchg commented on code in PR #21661:
URL: https://github.com/apache/kafka/pull/21661#discussion_r2898210261
##########
core/src/main/scala/kafka/server/KafkaConfig.scala:
##########
@@ -549,9 +549,9 @@ class KafkaConfig private(doLog: Boolean, val props:
util.Map[_, _])
"There must be at least one broker advertised listener." + (
if (processRoles.contains(ProcessRole.BrokerRole)) s" Perhaps all
listeners appear in ${KRaftConfigs.CONTROLLER_LISTENER_NAMES_CONFIG}?" else ""))
}
- def warnIfConfigDefinedInWrongRole(expectedRole: ProcessRole, configName:
String): Unit = {
+ def warnIfConfigDefinedInWrongRole(expectedRole: ProcessRole, configName:
String, extraMessage: String = ""): Unit = {
if (originals.containsKey(configName)) {
- warn(s"$configName is defined in ${processRoles.mkString(", ")}. It
should be defined in the $expectedRole role.")
+ warn(s"$configName is defined in ${processRoles.mkString(", ")}. It
should be defined in the $expectedRole role." + (if (extraMessage.isEmpty) ""
else s" $extraMessage"))
Review Comment:
Nit: `"role. $extraMessage"` should be good enought.
--
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]