kafka-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From jun...@apache.org
Subject kafka git commit: kafka-1711; WARN Property topic is not valid when running console producer; patched by Joe Crobak; reviewed by Jun Rao
Date Tue, 13 Jan 2015 17:15:33 GMT
Repository: kafka
Updated Branches:
  refs/heads/0.8.2 432d397af -> 4e584deeb


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/4e584dee
Tree: http://git-wip-us.apache.org/repos/asf/kafka/tree/4e584dee
Diff: http://git-wip-us.apache.org/repos/asf/kafka/diff/4e584dee

Branch: refs/heads/0.8.2
Commit: 4e584deeb652d9bc0b606f710e2bb137392f6f5f
Parents: 432d397
Author: Joe Crobak <joecrow@gmail.com>
Authored: Tue Jan 13 09:15:22 2015 -0800
Committer: Jun Rao <junrao@gmail.com>
Committed: Tue Jan 13 09:15:22 2015 -0800

----------------------------------------------------------------------
 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/4e584dee/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 a680b62..2a8e981 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