kafka-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From jun...@apache.org
Subject svn commit: r1161664 - /incubator/kafka/trunk/core/src/main/scala/kafka/tools/DumpLogSegments.scala
Date Thu, 25 Aug 2011 17:47:03 GMT
Author: junrao
Date: Thu Aug 25 17:47:03 2011
New Revision: 1161664

URL: http://svn.apache.org/viewvc?rev=1161664&view=rev
Log:
more info in DumpLogSegments; KAFKA-122 ; patched by Jun; reviewed by Neha

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

Modified: incubator/kafka/trunk/core/src/main/scala/kafka/tools/DumpLogSegments.scala
URL: http://svn.apache.org/viewvc/incubator/kafka/trunk/core/src/main/scala/kafka/tools/DumpLogSegments.scala?rev=1161664&r1=1161663&r2=1161664&view=diff
==============================================================================
--- incubator/kafka/trunk/core/src/main/scala/kafka/tools/DumpLogSegments.scala (original)
+++ incubator/kafka/trunk/core/src/main/scala/kafka/tools/DumpLogSegments.scala Thu Aug 25
17:47:03 2011
@@ -37,14 +37,11 @@ object DumpLogSegments {
         println("Starting offset: " + offset)
         val messageSet = new FileMessageSet(file, false)
         for(messageAndOffset <- messageSet) {
-          println("----------------------------------------------")
-         if (messageAndOffset.message.isValid)
-            println("offset:\t" + offset)
-          else
-            println("offset:\t %d \t invalid".format(offset))
+          val msg = messageAndOffset.message
+          println("offset: " + offset + " isvalid: " + msg.isValid + " magic: " + msg.magic
+ " compresscodec: " + msg.compressionCodec)
           if (!isNoPrint)
             println("payload:\t" + Utils.toString(messageAndOffset.message.payload, "UTF-8"))
-          offset = messageAndOffset.offset
+          offset += messageAndOffset.offset
         }
       }
     }



Mime
View raw message