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

        

Reply via email to