[ 
https://issues.apache.org/jira/browse/KAFKA-577?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=13485306#comment-13485306
 ] 

Jun Rao commented on KAFKA-577:
-------------------------------

Thanks for the patch. Some comments:

1. Could you add a --verifyOnly option so that we only do the verification but 
not print out the content?
2. The text in the following statement is too verbose. It doesn't need to print 
the index file since it's provided in the command line. It can just say "Index 
position %d doesn't match log position at offset %d".
        System.err.println(("The offset in index file [%s] does not match the 
offset stored in " +
                "log file [%s], they're %d and %d 
separately").format(entry.offset + index.baseOffset, messageAndOffset.offset))
3. Shouldn't we use %d instead of %l in the following line?
        System.err.println("The offset in the data log file [%s] is not 
consecutive, [%l] follows [%l]".format(file.getName, messageAndOffset.offset, 
lastOffset))
4. Could you add a shell script for DumpLogSegments in bin/ ?

                
> extend DumpLogSegments to verify consistency btw data and index
> ---------------------------------------------------------------
>
>                 Key: KAFKA-577
>                 URL: https://issues.apache.org/jira/browse/KAFKA-577
>             Project: Kafka
>          Issue Type: Bug
>          Components: core
>    Affects Versions: 0.8
>            Reporter: Jun Rao
>              Labels: newbie, tools
>         Attachments: kafka_577_v1.diff
>
>   Original Estimate: 24h
>  Remaining Estimate: 24h
>
> It would be good to extend DumpLogSegments to do the following verification:
> 1. The offsets stored in the index match those in the log data.
> 2. The offsets in the data log is consecutive.

--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators
For more information on JIRA, see: http://www.atlassian.com/software/jira

Reply via email to