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 D3D019968 for ; Tue, 12 Jun 2012 13:24:48 +0000 (UTC) Received: (qmail 14887 invoked by uid 500); 12 Jun 2012 13:24:48 -0000 Delivered-To: apmail-hadoop-hdfs-issues-archive@hadoop.apache.org Received: (qmail 14855 invoked by uid 500); 12 Jun 2012 13:24:48 -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 14847 invoked by uid 99); 12 Jun 2012 13:24:48 -0000 Received: from issues-vm.apache.org (HELO issues-vm) (140.211.11.160) by apache.org (qpsmtpd/0.29) with ESMTP; Tue, 12 Jun 2012 13:24:48 +0000 Received: from isssues-vm.apache.org (localhost [127.0.0.1]) by issues-vm (Postfix) with ESMTP id 753411404B4 for ; Tue, 12 Jun 2012 13:24:48 +0000 (UTC) Date: Tue, 12 Jun 2012 13:24:48 +0000 (UTC) From: "Hudson (JIRA)" To: hdfs-issues@hadoop.apache.org Message-ID: <578539739.7595.1339507488482.JavaMail.jiratomcat@issues-vm> In-Reply-To: <1844323038.23898.1330984317052.JavaMail.tomcat@hel.zones.apache.org> Subject: [jira] [Commented] (HDFS-3049) During the normal loading NN startup process, fall back on a different EditLog if we see one that is corrupt 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-3049?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=13293611#comment-13293611 ] Hudson commented on HDFS-3049: ------------------------------ Integrated in Hadoop-Mapreduce-trunk #1107 (See [https://builds.apache.org/job/Hadoop-Mapreduce-trunk/1107/]) HDFS-3049. During the normal NN startup process, fall back on a different edit log if we see one that is corrupt. Contributed by Colin Patrick McCabe. (Revision 1349114) Result = FAILURE todd : http://svn.apache.org/viewcvs.cgi/?root=Apache-SVN&view=rev&rev=1349114 Files : * /hadoop/common/trunk/hadoop-hdfs-project/hadoop-hdfs/CHANGES.txt * /hadoop/common/trunk/hadoop-hdfs-project/hadoop-hdfs/src/main/java/org/apache/hadoop/hdfs/server/namenode/FSEditLog.java * /hadoop/common/trunk/hadoop-hdfs-project/hadoop-hdfs/src/main/java/org/apache/hadoop/hdfs/server/namenode/FSEditLogLoader.java * /hadoop/common/trunk/hadoop-hdfs-project/hadoop-hdfs/src/main/java/org/apache/hadoop/hdfs/server/namenode/JournalSet.java * /hadoop/common/trunk/hadoop-hdfs-project/hadoop-hdfs/src/main/java/org/apache/hadoop/hdfs/server/namenode/RedundantEditLogInputStream.java * /hadoop/common/trunk/hadoop-hdfs-project/hadoop-hdfs/src/test/java/org/apache/hadoop/hdfs/MiniDFSCluster.java * /hadoop/common/trunk/hadoop-hdfs-project/hadoop-hdfs/src/test/java/org/apache/hadoop/hdfs/server/namenode/TestEditLog.java * /hadoop/common/trunk/hadoop-hdfs-project/hadoop-hdfs/src/test/java/org/apache/hadoop/hdfs/server/namenode/TestEditLogFileOutputStream.java * /hadoop/common/trunk/hadoop-hdfs-project/hadoop-hdfs/src/test/java/org/apache/hadoop/hdfs/server/namenode/TestFSEditLogLoader.java * /hadoop/common/trunk/hadoop-hdfs-project/hadoop-hdfs/src/test/java/org/apache/hadoop/hdfs/server/namenode/TestFileJournalManager.java * /hadoop/common/trunk/hadoop-hdfs-project/hadoop-hdfs/src/test/java/org/apache/hadoop/hdfs/server/namenode/TestNameNodeRecovery.java > During the normal loading NN startup process, fall back on a different EditLog if we see one that is corrupt > ------------------------------------------------------------------------------------------------------------ > > Key: HDFS-3049 > URL: https://issues.apache.org/jira/browse/HDFS-3049 > Project: Hadoop HDFS > Issue Type: New Feature > Components: name-node > Affects Versions: 0.23.0 > Reporter: Colin Patrick McCabe > Assignee: Colin Patrick McCabe > Priority: Minor > Fix For: 3.0.0 > > Attachments: HDFS-3049.001.patch, HDFS-3049.002.patch, HDFS-3049.003.patch, HDFS-3049.005.against3335.patch, HDFS-3049.006.against3335.patch, HDFS-3049.007.against3335.patch, HDFS-3049.010.patch, HDFS-3049.011.patch, HDFS-3049.012.patch, HDFS-3049.013.patch, HDFS-3049.015.patch, HDFS-3049.017.patch, HDFS-3049.018.patch, HDFS-3049.021.patch, HDFS-3049.023.patch, HDFS-3049.025.patch, HDFS-3049.026.patch, HDFS-3049.027.patch, HDFS-3049.028.patch, HDFS-3049.028.patch, HDFS-3049.028.patch > > > During the NameNode startup process, we load an image, and then apply edit logs to it until we believe that we have all the latest changes. Unfortunately, if there is an I/O error while reading any of these files, in most cases, we simply abort the startup process. We should try harder to locate a readable edit log and/or image file. > *There are three main use cases for this feature:* > 1. If the operating system does not honor fsync (usually due to a misconfiguration), a file may end up in an inconsistent state. > 2. In certain older releases where we did not use fallocate() or similar to pre-reserve blocks, a disk full condition may cause a truncated log in one edit directory. > 3. There may be a bug in HDFS which results in some of the data directories receiving corrupt data, but not all. This is the least likely use case. > *Proposed changes to normal NN startup* > * We should try a different FSImage if we can't load the first one we try. > * We should examine other FSEditLogs if we can't load the first one(s) we try. > * We should fail if we can't find EditLogs that would bring us up to what we believe is the latest transaction ID. > Proposed changes to recovery mode NN startup: > we should list out all the available storage directories and allow the operator to select which one he wants to use. > Something like this: > {code} > Multiple storage directories found. > 1. /foo/bar > edits__curent__XYZ size:213421345 md5:2345345 > image size:213421345 md5:2345345 > 2. /foo/baz > edits__curent__XYZ size:213421345 md5:2345345345 > image size:213421345 md5:2345345 > Which one would you like to use? (1/2) > {code} > As usual in recovery mode, we want to be flexible about error handling. In this case, this means that we should NOT fail if we can't find EditLogs that would bring us up to what we believe is the latest transaction ID. > *Not addressed by this feature* > This feature will not address the case where an attempt to access the NameNode name directory or directories hangs because of an I/O error. This may happen, for example, when trying to load an image from a hard-mounted NFS directory, when the NFS server has gone away. Just as now, the operator will have to notice this problem and take steps to correct it. -- 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