hadoop-hdfs-issues mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Todd Lipcon (Commented) (JIRA)" <j...@apache.org>
Subject [jira] [Commented] (HDFS-2991) failure to load edits: ClassCastException
Date Thu, 23 Feb 2012 19:30:55 GMT

    [ https://issues.apache.org/jira/browse/HDFS-2991?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=13214966#comment-13214966

Todd Lipcon commented on HDFS-2991:

Good catch on #1.

bq. You do not need to logOpenFile() in case of file creation. It is already done in dir.addFile().
Would be very confusing to journal the same transaction twice.
The patch actually removes logOpenFile() from {{dir.addFile}} so that the logging for both
cases are done in the same function. Otherwise I found the code harder to follow. The only
caller to {{dir.addFile}} was from here, so I think that's safe.

bq. Not wild about changing LAYOUT_VERSION to overcome the bug. Should we rather come up with
a repair tool? Should be easy to implement with OIV.
I actually did not change the LAYOUT_VERSION for just this reason. I just made it so that
the workaround code only triggers when it's an older version. Does that make sense?
> failure to load edits: ClassCastException
> -----------------------------------------
>                 Key: HDFS-2991
>                 URL: https://issues.apache.org/jira/browse/HDFS-2991
>             Project: Hadoop HDFS
>          Issue Type: Bug
>          Components: name-node
>    Affects Versions: 0.24.0, 0.23.1
>            Reporter: Todd Lipcon
>            Assignee: Todd Lipcon
>            Priority: Blocker
>         Attachments: hdfs-2991.txt, image-with-buggy-append.tgz
> In doing scale testing of trunk at r1291606, I hit the following:
> java.io.IOException: Error replaying edit log at offset 1354251
> Recent opcode offsets: 1350014 1350176 1350312 1354251
>         at org.apache.hadoop.hdfs.server.namenode.FSEditLogLoader.loadEditRecords(FSEditLogLoader.java:418)
>         at org.apache.hadoop.hdfs.server.namenode.FSEditLogLoader.loadFSEdits(FSEditLogLoader.java:93)
>         at org.apache.hadoop.hdfs.server.namenode.FSEditLogLoader.loadFSEdits(FSEditLogLoader.java:79)
> ...
> Caused by: java.lang.ClassCastException: org.apache.hadoop.hdfs.server.namenode.INodeFile
cannot be cast to org.apache.hadoop.hdfs.server.namenode.INodeFileUnderConstruction
>         at org.apache.hadoop.hdfs.server.namenode.FSEditLogLoader.loadEditRecords(FSEditLogLoader.java:213)
>         ... 13 more

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


View raw message