kafka-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From nehanarkh...@apache.org
Subject kafka git commit: KAFKA-1947 can't explicitly set replica-assignment when add partitions; reviewed by Neha Narkhede
Date Sun, 22 Feb 2015 04:27:52 GMT
Repository: kafka
Updated Branches:
  refs/heads/trunk 19031823c -> 62c7e0e48


KAFKA-1947 can't explicitly set replica-assignment when add partitions; reviewed by Neha Narkhede


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

Branch: refs/heads/trunk
Commit: 62c7e0e485b8b7693354c3a0a0bf95af671c93b6
Parents: 1903182
Author: Honghai Chen <waldenchen@163.com>
Authored: Sat Feb 21 20:26:57 2015 -0800
Committer: Neha Narkhede <neha.narkhede@gmail.com>
Committed: Sat Feb 21 20:27:23 2015 -0800

----------------------------------------------------------------------
 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/62c7e0e4/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 285c033..f400b71 100644
--- a/core/src/main/scala/kafka/admin/TopicCommand.scala
+++ b/core/src/main/scala/kafka/admin/TopicCommand.scala
@@ -301,8 +301,9 @@ object TopicCommand {
       CommandLineUtils.checkInvalidArgs(parser, options, deleteConfigOpt, allTopicLevelOpts
-- Set(alterOpt))
       CommandLineUtils.checkInvalidArgs(parser, options, partitionsOpt, allTopicLevelOpts
-- Set(alterOpt, createOpt))
       CommandLineUtils.checkInvalidArgs(parser, options, replicationFactorOpt, allTopicLevelOpts
-- Set(createOpt))
-      CommandLineUtils.checkInvalidArgs(parser, options, replicaAssignmentOpt,
-        allTopicLevelOpts -- Set(alterOpt, createOpt) + partitionsOpt + replicationFactorOpt)
+      CommandLineUtils.checkInvalidArgs(parser, options, replicaAssignmentOpt, allTopicLevelOpts
-- Set(createOpt,alterOpt))
+      if(options.has(createOpt))
+          CommandLineUtils.checkInvalidArgs(parser, options, replicaAssignmentOpt, Set(partitionsOpt,
replicationFactorOpt))
       CommandLineUtils.checkInvalidArgs(parser, options, reportUnderReplicatedPartitionsOpt,
         allTopicLevelOpts -- Set(describeOpt) + reportUnavailablePartitionsOpt + topicsWithOverridesOpt)
       CommandLineUtils.checkInvalidArgs(parser, options, reportUnavailablePartitionsOpt,


Mime
View raw message