kafka-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From jun...@apache.org
Subject git commit: kafka-1711; WARN Property topic is not valid when running console producer; patched by Joe Crobak; reviewed by Jun Rao
Date Fri, 24 Oct 2014 00:07:03 GMT
Repository: kafka
Updated Branches:
  refs/heads/trunk b77099626 -> e402c7be7


kafka-1711; WARN Property topic is not valid when running console producer; patched by Joe
Crobak; reviewed by Jun Rao


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

Branch: refs/heads/trunk
Commit: e402c7be723e5f189a8f2b4f91a28f3b26ea9112
Parents: b770996
Author: Joe Crobak <joecrow@gmail.com>
Authored: Thu Oct 23 17:06:49 2014 -0700
Committer: Jun Rao <junrao@gmail.com>
Committed: Thu Oct 23 17:06:49 2014 -0700

----------------------------------------------------------------------
 core/src/main/scala/kafka/tools/ConsoleProducer.scala | 6 ++++--
 1 file changed, 4 insertions(+), 2 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/kafka/blob/e402c7be/core/src/main/scala/kafka/tools/ConsoleProducer.scala
----------------------------------------------------------------------
diff --git a/core/src/main/scala/kafka/tools/ConsoleProducer.scala b/core/src/main/scala/kafka/tools/ConsoleProducer.scala
index 397d80d..1061cc7 100644
--- a/core/src/main/scala/kafka/tools/ConsoleProducer.scala
+++ b/core/src/main/scala/kafka/tools/ConsoleProducer.scala
@@ -35,9 +35,11 @@ object ConsoleProducer {
     val config = new ProducerConfig(args)
     val reader = Class.forName(config.readerClass).newInstance().asInstanceOf[MessageReader]
     val props = new Properties
-    props.put("topic", config.topic)
     props.putAll(config.cmdLineProps)
-    reader.init(System.in, props)
+    
+    val readerProps = new Properties(props)
+    readerProps.put("topic", config.topic)
+    reader.init(System.in, readerProps)
 
     try {
         val producer =


Mime
View raw message