From 8001aff30429879401cdd8cb44c12ea9d773dcfd Mon Sep 17 00:00:00 2001 From: Kamal Chandraprakash Date: Fri, 20 Sep 2019 23:51:06 +0530 Subject: [PATCH] KAFKA-8892: Display the sorted configs in Kafka Configs Help Command. Author: Kamal Chandraprakash Reviewers: Reviewers: Manikumar Reddy Closes #7319 from kamalcph/KAFKA-8892 --- core/src/main/scala/kafka/admin/ConfigCommand.scala | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/core/src/main/scala/kafka/admin/ConfigCommand.scala b/core/src/main/scala/kafka/admin/ConfigCommand.scala index 1b74eb6fc6e..9203334e461 100644 --- a/core/src/main/scala/kafka/admin/ConfigCommand.scala +++ b/core/src/main/scala/kafka/admin/ConfigCommand.scala @@ -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 { 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])