Return-Path: X-Original-To: apmail-hadoop-hdfs-issues-archive@minotaur.apache.org Delivered-To: apmail-hadoop-hdfs-issues-archive@minotaur.apache.org Received: from mail.apache.org (hermes.apache.org [140.211.11.3]) by minotaur.apache.org (Postfix) with SMTP id 48B839D61 for ; Thu, 23 Feb 2012 04:56:13 +0000 (UTC) Received: (qmail 35965 invoked by uid 500); 23 Feb 2012 04:56:12 -0000 Delivered-To: apmail-hadoop-hdfs-issues-archive@hadoop.apache.org Received: (qmail 35912 invoked by uid 500); 23 Feb 2012 04:56:11 -0000 Mailing-List: contact hdfs-issues-help@hadoop.apache.org; run by ezmlm Precedence: bulk List-Help: List-Unsubscribe: List-Post: List-Id: Reply-To: hdfs-issues@hadoop.apache.org Delivered-To: mailing list hdfs-issues@hadoop.apache.org Received: (qmail 35868 invoked by uid 99); 23 Feb 2012 04:56:10 -0000 Received: from athena.apache.org (HELO athena.apache.org) (140.211.11.136) by apache.org (qpsmtpd/0.29) with ESMTP; Thu, 23 Feb 2012 04:56:10 +0000 X-ASF-Spam-Status: No, hits=-2000.0 required=5.0 tests=ALL_TRUSTED,T_RP_MATCHES_RCVD X-Spam-Check-By: apache.org Received: from [140.211.11.116] (HELO hel.zones.apache.org) (140.211.11.116) by apache.org (qpsmtpd/0.29) with ESMTP; Thu, 23 Feb 2012 04:56:09 +0000 Received: from hel.zones.apache.org (hel.zones.apache.org [140.211.11.116]) by hel.zones.apache.org (Postfix) with ESMTP id DE80E335C6A for ; Thu, 23 Feb 2012 04:55:48 +0000 (UTC) Date: Thu, 23 Feb 2012 04:55:48 +0000 (UTC) From: "Todd Lipcon (Updated) (JIRA)" To: hdfs-issues@hadoop.apache.org Message-ID: <38770458.8205.1329972948913.JavaMail.tomcat@hel.zones.apache.org> In-Reply-To: <770621915.7703.1329962869390.JavaMail.tomcat@hel.zones.apache.org> Subject: [jira] [Updated] (HDFS-2991) failure to load edits: ClassCastException MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 7bit X-JIRA-FingerPrint: 30527f35849b9dde25b450d4833f0394 [ https://issues.apache.org/jira/browse/HDFS-2991?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ] Todd Lipcon updated HDFS-2991: ------------------------------ Attachment: hdfs-2991.txt image-with-buggy-append.tgz Attached patch fixes the issue and adds two tests. The first verifies that the underlying issue is fixed (ie that OP_ADD is always logged when the file is re-opened). The second verifies that we can continue to read the "broken" logs generated by prior versions. It depends on the attached tarball which goes in src/test/resources -- this tarball was created as described above using 0.23.1-rc2 (which displays the bug). I also set up the workaround code so that, if future versions have an issue like this, we'll throw the exception (ie the workaround only runs for known buggy versions). I didn't bump the log version, though, since the format itself has not changed. > 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