Browse Source

KAFKA-8892: Display the sorted configs in Kafka Configs Help Command.

Author: Kamal Chandraprakash <kamal.chandraprakash@gmail.com>

Reviewers: Reviewers: Manikumar Reddy <manikumar.reddy@gmail.com>

Closes #7319 from kamalcph/KAFKA-8892
pull/7379/head
Kamal Chandraprakash 5 years ago committed by Manikumar Reddy
parent
commit
8001aff304
  1. 8
      core/src/main/scala/kafka/admin/ConfigCommand.scala

8
core/src/main/scala/kafka/admin/ConfigCommand.scala

@ -128,7 +128,7 @@ object ConfigCommand extends Config { @@ -128,7 +128,7 @@ object ConfigCommand extends Config {
if (dynamicBrokerConfigs.nonEmpty) {
val perBrokerConfig = entityName != ConfigEntityName.Default
val errorMessage = s"--bootstrap-server option must be specified to update broker configs $dynamicBrokerConfigs."
val info = "Broker configuraton updates using ZooKeeper are supported for bootstrapping before brokers" +
val info = "Broker configuration updates using ZooKeeper are supported for bootstrapping before brokers" +
" are started to enable encrypted password configs to be stored in ZooKeeper."
if (perBrokerConfig) {
adminZkClient.parseBroker(entityName).foreach { brokerId =>
@ -522,9 +522,9 @@ object ConfigCommand extends Config { @@ -522,9 +522,9 @@ object ConfigCommand extends Config {
val nl = System.getProperty("line.separator")
val addConfig = parser.accepts("add-config", "Key Value pairs of configs to add. Square brackets can be used to group values which contain commas: 'k1=v1,k2=[v1,v2,v2],k3=v3'. The following is a list of valid configurations: " +
"For entity-type '" + ConfigType.Topic + "': " + LogConfig.configNames.map("\t" + _).mkString(nl, nl, nl) +
"For entity-type '" + ConfigType.Broker + "': " + DynamicConfig.Broker.names.asScala.map("\t" + _).mkString(nl, nl, nl) +
"For entity-type '" + ConfigType.User + "': " + DynamicConfig.User.names.asScala.map("\t" + _).mkString(nl, nl, nl) +
"For entity-type '" + ConfigType.Client + "': " + DynamicConfig.Client.names.asScala.map("\t" + _).mkString(nl, nl, nl) +
"For entity-type '" + ConfigType.Broker + "': " + DynamicConfig.Broker.names.asScala.toSeq.sorted.map("\t" + _).mkString(nl, nl, nl) +
"For entity-type '" + ConfigType.User + "': " + DynamicConfig.User.names.asScala.toSeq.sorted.map("\t" + _).mkString(nl, nl, nl) +
"For entity-type '" + ConfigType.Client + "': " + DynamicConfig.Client.names.asScala.toSeq.sorted.map("\t" + _).mkString(nl, nl, nl) +
s"Entity types '${ConfigType.User}' and '${ConfigType.Client}' may be specified together to update config for clients of a specific user.")
.withRequiredArg
.ofType(classOf[String])

Loading…
Cancel
Save