kafka-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From jun...@apache.org
Subject svn commit: r1164353 - in /incubator/kafka/trunk/core/src/main/scala/kafka/tools: ConsumerShell.scala ProducerShell.scala
Date Fri, 02 Sep 2011 05:19:15 GMT
Author: junrao
Date: Fri Sep  2 05:19:15 2011
New Revision: 1164353

URL: http://svn.apache.org/viewvc?rev=1164353&view=rev
Log:
fix string formatting; write data to stdout in ConsumerShell

Modified:
    incubator/kafka/trunk/core/src/main/scala/kafka/tools/ConsumerShell.scala
    incubator/kafka/trunk/core/src/main/scala/kafka/tools/ProducerShell.scala

Modified: incubator/kafka/trunk/core/src/main/scala/kafka/tools/ConsumerShell.scala
URL: http://svn.apache.org/viewvc/incubator/kafka/trunk/core/src/main/scala/kafka/tools/ConsumerShell.scala?rev=1164353&r1=1164352&r2=1164353&view=diff
==============================================================================
--- incubator/kafka/trunk/core/src/main/scala/kafka/tools/ConsumerShell.scala (original)
+++ incubator/kafka/trunk/core/src/main/scala/kafka/tools/ConsumerShell.scala Fri Sep  2 05:19:15
2011
@@ -92,7 +92,7 @@ class ZKConsumerThread(stream: KafkaMess
     var count: Int = 0
     try {
       for (message <- stream) {
-        logger.debug("consumed: " + Utils.toString(message.payload, "UTF-8"))
+        println("consumed: " + Utils.toString(message.payload, "UTF-8"))
         count += 1
       }
     }catch {

Modified: incubator/kafka/trunk/core/src/main/scala/kafka/tools/ProducerShell.scala
URL: http://svn.apache.org/viewvc/incubator/kafka/trunk/core/src/main/scala/kafka/tools/ProducerShell.scala?rev=1164353&r1=1164352&r2=1164353&view=diff
==============================================================================
--- incubator/kafka/trunk/core/src/main/scala/kafka/tools/ProducerShell.scala (original)
+++ incubator/kafka/trunk/core/src/main/scala/kafka/tools/ProducerShell.scala Fri Sep  2 05:19:15
2011
@@ -71,7 +71,7 @@ object ProducerShell {
         val lineBytes = line.trim.getBytes()
         val messageList = new ByteBufferMessageSet(compressionCodec = NoCompressionCodec,
messages = new Message(lineBytes))
         producer.send(topic, messageList)
-        println("Sent: %d (%ld) bytes)".format(line, messageList.sizeInBytes))
+        println("Sent: %s (%d bytes)".format(line, messageList.sizeInBytes))
       }
     }
     producer.close()



Mime
View raw message