You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@kafka.apache.org by jk...@apache.org on 2014/10/07 02:19:56 UTC
git commit: KAFKA-1668 Print an error if you try to alter a topic
that doesn't exist.
Repository: kafka
Updated Branches:
refs/heads/trunk f452c426b -> 88595bfb5
KAFKA-1668 Print an error if you try to alter a topic that doesn't exist.
Project: http://git-wip-us.apache.org/repos/asf/kafka/repo
Commit: http://git-wip-us.apache.org/repos/asf/kafka/commit/88595bfb
Tree: http://git-wip-us.apache.org/repos/asf/kafka/tree/88595bfb
Diff: http://git-wip-us.apache.org/repos/asf/kafka/diff/88595bfb
Branch: refs/heads/trunk
Commit: 88595bfb5229bda0ad7c3de2ce3b04f95a9f38a7
Parents: f452c42
Author: Manikumar Reddy <ma...@gmail.com>
Authored: Mon Oct 6 17:16:07 2014 -0700
Committer: Jay Kreps <ja...@gmail.com>
Committed: Mon Oct 6 17:19:09 2014 -0700
----------------------------------------------------------------------
core/src/main/scala/kafka/admin/TopicCommand.scala | 3 +++
1 file changed, 3 insertions(+)
----------------------------------------------------------------------
http://git-wip-us.apache.org/repos/asf/kafka/blob/88595bfb/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 3b2166a..7672c5a 100644
--- a/core/src/main/scala/kafka/admin/TopicCommand.scala
+++ b/core/src/main/scala/kafka/admin/TopicCommand.scala
@@ -96,6 +96,9 @@ object TopicCommand {
def alterTopic(zkClient: ZkClient, opts: TopicCommandOptions) {
val topics = getTopics(zkClient, opts)
+ if (topics.length == 0) {
+ println("Topic %s does not exist".format(opts.options.valueOf(opts.topicOpt)))
+ }
topics.foreach { topic =>
val configs = AdminUtils.fetchTopicConfig(zkClient, topic)
if(opts.options.has(opts.configOpt) || opts.options.has(opts.deleteConfigOpt)) {