kafka-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From sriram...@apache.org
Subject [03/19] git commit: change comments
Date Tue, 25 Feb 2014 08:27:13 GMT
change comments


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

Branch: refs/heads/trunk
Commit: 7c920e97ef9e2db80774d6ccd9b85e3934e92645
Parents: b998f5d
Author: Sriram Subramanian <sriram.sub@gmail.com>
Authored: Wed Oct 9 10:54:09 2013 -0700
Committer: Sriram Subramanian <sriram.sub@gmail.com>
Committed: Wed Oct 9 10:54:09 2013 -0700

----------------------------------------------------------------------
 core/src/main/scala/kafka/admin/TopicCommand.scala | 5 +++--
 1 file changed, 3 insertions(+), 2 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/kafka/blob/7c920e97/core/src/main/scala/kafka/admin/TopicCommand.scala
----------------------------------------------------------------------
diff --git a/core/src/main/scala/kafka/admin/TopicCommand.scala b/core/src/main/scala/kafka/admin/TopicCommand.scala
index ee940e9..56f3177 100644
--- a/core/src/main/scala/kafka/admin/TopicCommand.scala
+++ b/core/src/main/scala/kafka/admin/TopicCommand.scala
@@ -85,7 +85,8 @@ object TopicCommand {
       println("Updated config for topic \"%s\".".format(topic))
     }
     if(opts.options.has(opts.partitionsOpt)) {
-      println("partitions can only be added when topic has no key")
+      println("WARNING: If partitions are increased for a topic that has a key, the partition
" +
+        "logic or ordering of the messages will be affected")
       val nPartitions = opts.options.valueOf(opts.partitionsOpt).intValue
       val replicaAssignmentStr = opts.options.valueOf(opts.replicaAssignmentOpt)
       AdminUtils.addPartitions(zkClient, topic, nPartitions, replicaAssignmentStr)
@@ -188,7 +189,7 @@ object TopicCommand {
                           .describedAs("name=value")
                           .ofType(classOf[String])
     val partitionsOpt = parser.accepts("partitions", "The number of partitions for the topic
being created or " +
-      "altered (Partitions can only be added for a topic which has no key. Partitions cannot
be decreased")
+      "altered (WARNING: If partitions are increased for a topic that has a key, the partition
logic or ordering of the messages will be affected")
                            .withRequiredArg
                            .describedAs("# of partitions")
                            .ofType(classOf[java.lang.Integer])


Mime
View raw message