kafka-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From jjko...@apache.org
Subject kafka git commit: KAFKA-2246; Fix incorrect config ZK path.
Date Thu, 20 Aug 2015 01:17:06 GMT
Repository: kafka
Updated Branches:
  refs/heads/trunk 47b7a686e -> 0b04f9f34


KAFKA-2246; Fix incorrect config ZK path.

This bug was introduced while committing KAFKA-2205. Basically, the path for topic overrides
was renamed to "topic" from "topics". However, this causes existing topic config overrides
to break because they will not be read from ZK anymore since the path is different.

https://reviews.apache.org/r/34554/

Author: Aditya Auradkar <aauradkar@linkedin.com>

Reviewers: Joel Koshy

Closes #152 from auradkar/2446


Project: http://git-wip-us.apache.org/repos/asf/kafka/repo
Commit: http://git-wip-us.apache.org/repos/asf/kafka/commit/0b04f9f3
Tree: http://git-wip-us.apache.org/repos/asf/kafka/tree/0b04f9f3
Diff: http://git-wip-us.apache.org/repos/asf/kafka/diff/0b04f9f3

Branch: refs/heads/trunk
Commit: 0b04f9f34b37dd43c68c572dfae6bb75144f066c
Parents: 47b7a68
Author: Aditya Auradkar <aauradkar@linkedin.com>
Authored: Wed Aug 19 18:16:59 2015 -0700
Committer: Joel Koshy <jjkoshy@gmail.com>
Committed: Wed Aug 19 18:16:59 2015 -0700

----------------------------------------------------------------------
 core/src/main/scala/kafka/admin/ConfigCommand.scala          | 4 ++--
 core/src/main/scala/kafka/server/DynamicConfigManager.scala  | 6 +++---
 core/src/test/scala/unit/kafka/admin/ConfigCommandTest.scala | 8 ++++----
 3 files changed, 9 insertions(+), 9 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/kafka/blob/0b04f9f3/core/src/main/scala/kafka/admin/ConfigCommand.scala
----------------------------------------------------------------------
diff --git a/core/src/main/scala/kafka/admin/ConfigCommand.scala b/core/src/main/scala/kafka/admin/ConfigCommand.scala
index 2759476..17bbbcb 100644
--- a/core/src/main/scala/kafka/admin/ConfigCommand.scala
+++ b/core/src/main/scala/kafka/admin/ConfigCommand.scala
@@ -38,7 +38,7 @@ object ConfigCommand {
     val opts = new ConfigCommandOptions(args)
 
     if(args.length == 0)
-      CommandLineUtils.printUsageAndDie(opts.parser, "Add/Remove entity (topic/client) configs")
+      CommandLineUtils.printUsageAndDie(opts.parser, "Add/Remove entity (topics/clients)
configs")
 
     opts.checkArgs()
 
@@ -122,7 +122,7 @@ object ConfigCommand {
             .ofType(classOf[String])
     val alterOpt = parser.accepts("alter", "Alter the configuration for the entity.")
     val describeOpt = parser.accepts("describe", "List configs for the given entity.")
-    val entityType = parser.accepts("entity-type", "Type of entity (topic/client)")
+    val entityType = parser.accepts("entity-type", "Type of entity (topics/clients)")
             .withRequiredArg
             .ofType(classOf[String])
     val entityName = parser.accepts("entity-name", "Name of entity (topic name/client id)")

http://git-wip-us.apache.org/repos/asf/kafka/blob/0b04f9f3/core/src/main/scala/kafka/server/DynamicConfigManager.scala
----------------------------------------------------------------------
diff --git a/core/src/main/scala/kafka/server/DynamicConfigManager.scala b/core/src/main/scala/kafka/server/DynamicConfigManager.scala
index a66fb75..4da1833 100644
--- a/core/src/main/scala/kafka/server/DynamicConfigManager.scala
+++ b/core/src/main/scala/kafka/server/DynamicConfigManager.scala
@@ -32,8 +32,8 @@ import org.I0Itec.zkclient.{IZkChildListener, ZkClient}
  * Represents all the entities that can be configured via ZK
  */
 object ConfigType {
-  val Topic = "topic"
-  val Client = "client"
+  val Topic = "topics"
+  val Client = "clients"
 }
 
 /**
@@ -180,4 +180,4 @@ class DynamicConfigManager(private val zkClient: ZkClient,
       }
     }
   }
-}
\ No newline at end of file
+}

http://git-wip-us.apache.org/repos/asf/kafka/blob/0b04f9f3/core/src/test/scala/unit/kafka/admin/ConfigCommandTest.scala
----------------------------------------------------------------------
diff --git a/core/src/test/scala/unit/kafka/admin/ConfigCommandTest.scala b/core/src/test/scala/unit/kafka/admin/ConfigCommandTest.scala
index 6524ae7..0379064 100644
--- a/core/src/test/scala/unit/kafka/admin/ConfigCommandTest.scala
+++ b/core/src/test/scala/unit/kafka/admin/ConfigCommandTest.scala
@@ -28,14 +28,14 @@ class ConfigCommandTest extends ZooKeeperTestHarness with Logging {
     // Should parse correctly
     var createOpts = new ConfigCommandOptions(Array("--zookeeper", zkConnect,
                                                      "--entity-name", "x",
-                                                     "--entity-type", "client",
+                                                     "--entity-type", "clients",
                                                      "--describe"))
     createOpts.checkArgs()
 
     // For --alter and added config
     createOpts = new ConfigCommandOptions(Array("--zookeeper", zkConnect,
                                                 "--entity-name", "x",
-                                                "--entity-type", "client",
+                                                "--entity-type", "clients",
                                                 "--alter",
                                                 "--added-config", "a=b,c=d"))
     createOpts.checkArgs()
@@ -43,7 +43,7 @@ class ConfigCommandTest extends ZooKeeperTestHarness with Logging {
     // For alter and deleted config
     createOpts = new ConfigCommandOptions(Array("--zookeeper", zkConnect,
                                                 "--entity-name", "x",
-                                                "--entity-type", "client",
+                                                "--entity-type", "clients",
                                                 "--alter",
                                                 "--deleted-config", "a,b,c"))
     createOpts.checkArgs()
@@ -51,7 +51,7 @@ class ConfigCommandTest extends ZooKeeperTestHarness with Logging {
     // For alter and both added, deleted config
     createOpts = new ConfigCommandOptions(Array("--zookeeper", zkConnect,
                                                 "--entity-name", "x",
-                                                "--entity-type", "client",
+                                                "--entity-type", "clients",
                                                 "--alter",
                                                 "--added-config", "a=b,c=d",
                                                 "--deleted-config", "a"))


Mime
View raw message