You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@kafka.apache.org by "Guozhang Wang (JIRA)" <ji...@apache.org> on 2013/08/15 02:12:47 UTC
[jira] [Commented] (KAFKA-1009) DumpLogSegments tool should return
error on non-existing files
[ https://issues.apache.org/jira/browse/KAFKA-1009?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=13740470#comment-13740470 ]
Guozhang Wang commented on KAFKA-1009:
--------------------------------------
This is due to the fact that in dumpLog, it create a FileMessageSet(file) for the filename, which use "rw" in creating the RandomAccessFile. When under "rw" mode if the file does not exist it will create one.
Proposed fix: instead of call FileMessageSet(file), call a new function FileMessageSet(file, mutable), and set mutable to false to specify it is read-only.
> DumpLogSegments tool should return error on non-existing files
> --------------------------------------------------------------
>
> Key: KAFKA-1009
> URL: https://issues.apache.org/jira/browse/KAFKA-1009
> Project: Kafka
> Issue Type: Bug
> Components: core
> Affects Versions: 0.8
> Reporter: Jun Rao
> Assignee: Guozhang Wang
> Priority: Minor
> Fix For: 0.8.1
>
>
> If we run the tool on an non-existing file, we get the following
> bin/kafka-run-class.sh kafka.tools.DumpLogSegments --files 00.log
> Dumping 00.log
> Starting offset: 0
> The tool should return an error message instead.
--
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