You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@kafka.apache.org by "Edward Capriolo (JIRA)" <ji...@apache.org> on 2012/07/11 20:31:34 UTC
[jira] [Created] (KAFKA-400) kafka-producer-shell.sh throws
exceptions trying to send data.
Edward Capriolo created KAFKA-400:
-------------------------------------
Summary: kafka-producer-shell.sh throws exceptions trying to send data.
Key: KAFKA-400
URL: https://issues.apache.org/jira/browse/KAFKA-400
Project: Kafka
Issue Type: Bug
Reporter: Edward Capriolo
The producer and consumer shell are very useful for testing. The producer shell is broken and I end up doing all testing with kafka-producer-perf-test.sh which is less then idea.
{noformat}
[edward@ec kafka-mirror]$ bin/kafka-producer-shell.sh --props config/consumer2.properties --topic topic_in_two
[2012-07-11 14:27:11,926] INFO Creating sync producer for broker id = 0 at 127.0.0.2:9092 (kafka.producer.ProducerPool)
yo
Exception in thread "main" java.lang.ClassCastException: java.lang.String cannot be cast to kafka.message.Message
at kafka.serializer.DefaultEncoder.toMessage(Encoder.scala:26)
at kafka.producer.ProducerPool$$anonfun$send$1$$anonfun$3$$anonfun$apply$1.apply(ProducerPool.scala:107)
at kafka.producer.ProducerPool$$anonfun$send$1$$anonfun$3$$anonfun$apply$1.apply(ProducerPool.scala:107)
at scala.collection.TraversableLike$$anonfun$map$1.apply(TraversableLike.scala:206)
at scala.collection.TraversableLike$$anonfun$map$1.apply(TraversableLike.scala:206)
at scala.collection.LinearSeqOptimized$class.foreach(LinearSeqOptimized.scala:61)
at scala.collection.immutable.List.foreach(List.scala:45)
at scala.collection.TraversableLike$class.map(TraversableLike.scala:206)
at scala.collection.immutable.List.map(List.scala:45)
at kafka.producer.ProducerPool$$anonfun$send$1$$anonfun$3.apply(ProducerPool.scala:107)
at kafka.producer.ProducerPool$$anonfun$send$1$$anonfun$3.apply(ProducerPool.scala:105)
at scala.collection.TraversableLike$$anonfun$map$1.apply(TraversableLike.scala:206)
at scala.collection.TraversableLike$$anonfun$map$1.apply(TraversableLike.scala:206)
at scala.collection.mutable.ResizableArray$class.foreach(ResizableArray.scala:57)
at scala.collection.mutable.ArrayBuffer.foreach(ArrayBuffer.scala:43)
at scala.collection.TraversableLike$class.map(TraversableLike.scala:206)
at scala.collection.mutable.ArrayBuffer.map(ArrayBuffer.scala:43)
at kafka.producer.ProducerPool$$anonfun$send$1.apply$mcVI$sp(ProducerPool.scala:105)
at kafka.producer.ProducerPool$$anonfun$send$1.apply(ProducerPool.scala:100)
at kafka.producer.ProducerPool$$anonfun$send$1.apply(ProducerPool.scala:100)
at scala.collection.mutable.ResizableArray$class.foreach(ResizableArray.scala:57)
at scala.collection.mutable.ArrayBuffer.foreach(ArrayBuffer.scala:43)
at kafka.producer.ProducerPool.send(ProducerPool.scala:100)
at kafka.producer.Producer.zkSend(Producer.scala:137)
at kafka.producer.Producer.send(Producer.scala:99)
at kafka.tools.ProducerShell$.main(ProducerShell.scala:65)
at kafka.tools.ProducerShell.main(ProducerShell.scala)
{noformat}
--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators: https://issues.apache.org/jira/secure/ContactAdministrators!default.jspa
For more information on JIRA, see: http://www.atlassian.com/software/jira
[jira] [Resolved] (KAFKA-400) kafka-producer-shell.sh throws
exceptions trying to send data.
Posted by "Edward Capriolo (JIRA)" <ji...@apache.org>.
[ https://issues.apache.org/jira/browse/KAFKA-400?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]
Edward Capriolo resolved KAFKA-400.
-----------------------------------
Resolution: Won't Fix
You are correct wrong parameters
> kafka-producer-shell.sh throws exceptions trying to send data.
> --------------------------------------------------------------
>
> Key: KAFKA-400
> URL: https://issues.apache.org/jira/browse/KAFKA-400
> Project: Kafka
> Issue Type: Bug
> Reporter: Edward Capriolo
>
> The producer and consumer shell are very useful for testing. The producer shell is broken and I end up doing all testing with kafka-producer-perf-test.sh which is less then idea.
> {noformat}
> [edward@ec kafka-mirror]$ bin/kafka-producer-shell.sh --props config/consumer2.properties --topic topic_in_two
> [2012-07-11 14:27:11,926] INFO Creating sync producer for broker id = 0 at 127.0.0.2:9092 (kafka.producer.ProducerPool)
> yo
> Exception in thread "main" java.lang.ClassCastException: java.lang.String cannot be cast to kafka.message.Message
> at kafka.serializer.DefaultEncoder.toMessage(Encoder.scala:26)
> at kafka.producer.ProducerPool$$anonfun$send$1$$anonfun$3$$anonfun$apply$1.apply(ProducerPool.scala:107)
> at kafka.producer.ProducerPool$$anonfun$send$1$$anonfun$3$$anonfun$apply$1.apply(ProducerPool.scala:107)
> at scala.collection.TraversableLike$$anonfun$map$1.apply(TraversableLike.scala:206)
> at scala.collection.TraversableLike$$anonfun$map$1.apply(TraversableLike.scala:206)
> at scala.collection.LinearSeqOptimized$class.foreach(LinearSeqOptimized.scala:61)
> at scala.collection.immutable.List.foreach(List.scala:45)
> at scala.collection.TraversableLike$class.map(TraversableLike.scala:206)
> at scala.collection.immutable.List.map(List.scala:45)
> at kafka.producer.ProducerPool$$anonfun$send$1$$anonfun$3.apply(ProducerPool.scala:107)
> at kafka.producer.ProducerPool$$anonfun$send$1$$anonfun$3.apply(ProducerPool.scala:105)
> at scala.collection.TraversableLike$$anonfun$map$1.apply(TraversableLike.scala:206)
> at scala.collection.TraversableLike$$anonfun$map$1.apply(TraversableLike.scala:206)
> at scala.collection.mutable.ResizableArray$class.foreach(ResizableArray.scala:57)
> at scala.collection.mutable.ArrayBuffer.foreach(ArrayBuffer.scala:43)
> at scala.collection.TraversableLike$class.map(TraversableLike.scala:206)
> at scala.collection.mutable.ArrayBuffer.map(ArrayBuffer.scala:43)
> at kafka.producer.ProducerPool$$anonfun$send$1.apply$mcVI$sp(ProducerPool.scala:105)
> at kafka.producer.ProducerPool$$anonfun$send$1.apply(ProducerPool.scala:100)
> at kafka.producer.ProducerPool$$anonfun$send$1.apply(ProducerPool.scala:100)
> at scala.collection.mutable.ResizableArray$class.foreach(ResizableArray.scala:57)
> at scala.collection.mutable.ArrayBuffer.foreach(ArrayBuffer.scala:43)
> at kafka.producer.ProducerPool.send(ProducerPool.scala:100)
> at kafka.producer.Producer.zkSend(Producer.scala:137)
> at kafka.producer.Producer.send(Producer.scala:99)
> at kafka.tools.ProducerShell$.main(ProducerShell.scala:65)
> at kafka.tools.ProducerShell.main(ProducerShell.scala)
> {noformat}
--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators: https://issues.apache.org/jira/secure/ContactAdministrators!default.jspa
For more information on JIRA, see: http://www.atlassian.com/software/jira
[jira] [Commented] (KAFKA-400) kafka-producer-shell.sh throws
exceptions trying to send data.
Posted by "Joe Stein (JIRA)" <ji...@apache.org>.
[ https://issues.apache.org/jira/browse/KAFKA-400?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=13412394#comment-13412394 ]
Joe Stein commented on KAFKA-400:
---------------------------------
hey Ed, try
bin/kafka-producer-shell.sh --props config/producer.properties --topic topic_in_two
the consumer.property file is missing the serialize.class property but if you use the producer.properties you should be good to go
> kafka-producer-shell.sh throws exceptions trying to send data.
> --------------------------------------------------------------
>
> Key: KAFKA-400
> URL: https://issues.apache.org/jira/browse/KAFKA-400
> Project: Kafka
> Issue Type: Bug
> Reporter: Edward Capriolo
>
> The producer and consumer shell are very useful for testing. The producer shell is broken and I end up doing all testing with kafka-producer-perf-test.sh which is less then idea.
> {noformat}
> [edward@ec kafka-mirror]$ bin/kafka-producer-shell.sh --props config/consumer2.properties --topic topic_in_two
> [2012-07-11 14:27:11,926] INFO Creating sync producer for broker id = 0 at 127.0.0.2:9092 (kafka.producer.ProducerPool)
> yo
> Exception in thread "main" java.lang.ClassCastException: java.lang.String cannot be cast to kafka.message.Message
> at kafka.serializer.DefaultEncoder.toMessage(Encoder.scala:26)
> at kafka.producer.ProducerPool$$anonfun$send$1$$anonfun$3$$anonfun$apply$1.apply(ProducerPool.scala:107)
> at kafka.producer.ProducerPool$$anonfun$send$1$$anonfun$3$$anonfun$apply$1.apply(ProducerPool.scala:107)
> at scala.collection.TraversableLike$$anonfun$map$1.apply(TraversableLike.scala:206)
> at scala.collection.TraversableLike$$anonfun$map$1.apply(TraversableLike.scala:206)
> at scala.collection.LinearSeqOptimized$class.foreach(LinearSeqOptimized.scala:61)
> at scala.collection.immutable.List.foreach(List.scala:45)
> at scala.collection.TraversableLike$class.map(TraversableLike.scala:206)
> at scala.collection.immutable.List.map(List.scala:45)
> at kafka.producer.ProducerPool$$anonfun$send$1$$anonfun$3.apply(ProducerPool.scala:107)
> at kafka.producer.ProducerPool$$anonfun$send$1$$anonfun$3.apply(ProducerPool.scala:105)
> at scala.collection.TraversableLike$$anonfun$map$1.apply(TraversableLike.scala:206)
> at scala.collection.TraversableLike$$anonfun$map$1.apply(TraversableLike.scala:206)
> at scala.collection.mutable.ResizableArray$class.foreach(ResizableArray.scala:57)
> at scala.collection.mutable.ArrayBuffer.foreach(ArrayBuffer.scala:43)
> at scala.collection.TraversableLike$class.map(TraversableLike.scala:206)
> at scala.collection.mutable.ArrayBuffer.map(ArrayBuffer.scala:43)
> at kafka.producer.ProducerPool$$anonfun$send$1.apply$mcVI$sp(ProducerPool.scala:105)
> at kafka.producer.ProducerPool$$anonfun$send$1.apply(ProducerPool.scala:100)
> at kafka.producer.ProducerPool$$anonfun$send$1.apply(ProducerPool.scala:100)
> at scala.collection.mutable.ResizableArray$class.foreach(ResizableArray.scala:57)
> at scala.collection.mutable.ArrayBuffer.foreach(ArrayBuffer.scala:43)
> at kafka.producer.ProducerPool.send(ProducerPool.scala:100)
> at kafka.producer.Producer.zkSend(Producer.scala:137)
> at kafka.producer.Producer.send(Producer.scala:99)
> at kafka.tools.ProducerShell$.main(ProducerShell.scala:65)
> at kafka.tools.ProducerShell.main(ProducerShell.scala)
> {noformat}
--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators: https://issues.apache.org/jira/secure/ContactAdministrators!default.jspa
For more information on JIRA, see: http://www.atlassian.com/software/jira