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 B62908FB4 for ; Thu, 18 Aug 2011 17:18:50 +0000 (UTC) Received: (qmail 42537 invoked by uid 500); 18 Aug 2011 17:18:50 -0000 Delivered-To: apmail-hadoop-hdfs-issues-archive@hadoop.apache.org Received: (qmail 42033 invoked by uid 500); 18 Aug 2011 17:18:49 -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 42016 invoked by uid 99); 18 Aug 2011 17:18:48 -0000 Received: from athena.apache.org (HELO athena.apache.org) (140.211.11.136) by apache.org (qpsmtpd/0.29) with ESMTP; Thu, 18 Aug 2011 17:18:48 +0000 X-ASF-Spam-Status: No, hits=-2001.1 required=5.0 tests=ALL_TRUSTED,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, 18 Aug 2011 17:18:47 +0000 Received: from hel.zones.apache.org (hel.zones.apache.org [140.211.11.116]) by hel.zones.apache.org (Postfix) with ESMTP id 3E2ECC212C for ; Thu, 18 Aug 2011 17:18:27 +0000 (UTC) Date: Thu, 18 Aug 2011 17:18:27 +0000 (UTC) From: "Suresh Srinivas (JIRA)" To: hdfs-issues@hadoop.apache.org Message-ID: <13006721.49696.1313687907251.JavaMail.tomcat@hel.zones.apache.org> In-Reply-To: <1031892733.49248.1313677947158.JavaMail.tomcat@hel.zones.apache.org> Subject: [jira] [Commented] (HDFS-2271) startJournalSpool should invoke ProcessIOError with failed storage directories if createEditLogFile throws any exception. 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-2271?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=13087123#comment-13087123 ] Suresh Srinivas commented on HDFS-2271: --------------------------------------- Uma, can you please keep the description brief and add the details description to a comment to avoid lengthy emails. > startJournalSpool should invoke ProcessIOError with failed storage directories if createEditLogFile throws any exception. > --------------------------------------------------------------------------------------------------------------------------- > > Key: HDFS-2271 > URL: https://issues.apache.org/jira/browse/HDFS-2271 > Project: Hadoop HDFS > Issue Type: Bug > Affects Versions: 0.22.0 > Reporter: Uma Maheswara Rao G > Assignee: Uma Maheswara Rao G > > If createEditsLogFile failes in startJournalSpool of BackUpStorage, BackUPNode will proceed with following exceptions. > 2011-04-09 21:24:43,892 ERROR namenode.FSNamesystem (FSEditLog.java:logSync(1207)) - Unable to sync edit log. > org.apache.hadoop.ipc.RemoteException: java.io.FileNotFoundException: /hdfsdata/7/patch/name/data/current/edits (No such file or directory) > at java.io.RandomAccessFile.open(Native Method) > at java.io.RandomAccessFile.(RandomAccessFile.java:212) > at org.apache.hadoop.hdfs.server.namenode.FSEditLog$EditLogFileOutputStream.(FSEditLog.java:150) > at org.apache.hadoop.hdfs.server.namenode.FSEditLog.createEditLogFile(FSEditLog.java:427) > at org.apache.hadoop.hdfs.server.namenode.BackupStorage.startJournalSpool(BackupStorage.java:275) > at org.apache.hadoop.hdfs.server.namenode.BackupNode.journal(BackupNode.java:327) > at sun.reflect.GeneratedMethodAccessor2.invoke(Unknown Source) > at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25) > at java.lang.reflect.Method.invoke(Method.java:597) > at org.apache.hadoop.ipc.RPC$Server.call(RPC.java:541) > at org.apache.hadoop.ipc.Server$Handler$1.run(Server.java:1105) > at org.apache.hadoop.ipc.Server$Handler$1.run(Server.java:1101) > at java.security.AccessController.doPrivileged(Native Method) > at javax.security.auth.Subject.doAs(Subject.java:396) > at org.apache.hadoop.ipc.Server$Handler.run(Server.java:1099) > at org.apache.hadoop.ipc.Client.call(Client.java:953) > at org.apache.hadoop.ipc.RPC$Invoker.invoke(RPC.java:239) > at $Proxy4.journal(Unknown Source) > at org.apache.hadoop.hdfs.server.namenode.EditLogBackupOutputStream.send(EditLogBackupOutputStream.java:165) > at org.apache.hadoop.hdfs.server.namenode.EditLogBackupOutputStream.flushAndSync(EditLogBackupOutputStream.java:145) > at org.apache.hadoop.hdfs.server.namenode.EditLogOutputStream.flush(EditLogOutputStream.java:83) > at org.apache.hadoop.hdfs.server.namenode.FSEditLog.logSync(FSEditLog.java:1204) > at org.apache.hadoop.hdfs.server.namenode.FSNamesystem.startCheckpoint(FSNamesystem.java:5164) > at org.apache.hadoop.hdfs.server.namenode.NameNode.startCheckpoint(NameNode.java:547) > at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method) > at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39) > at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25) > at java.lang.reflect.Method.invoke(Method.java:597) > at org.apache.hadoop.ipc.RPC$Server.call(RPC.java:541) > at org.apache.hadoop.ipc.Server$Handler$1.run(Server.java:1105) > at org.apache.hadoop.ipc.Server$Handler$1.run(Server.java:1101) > at java.security.AccessController.doPrivileged(Native Method) > at javax.security.auth.Subject.doAs(Subject.java:396) > at org.apache.hadoop.ipc.Server$Handler.run(Server.java:1099) > 2011-04-09 21:24:43,893 ERROR namenode.FSNamesystem (FSEditLog.java:processIOError(557)) - Unable to log edits to 10.18.53.203:50100 > 2011-04-09 21:24:44,353 WARN mortbay.log (Slf4jLog.java:warn(76)) - /getimage: java.io.IOException: GetImage failed. java.io.IOException: Inconsistent checkpoint fields. > LV = -18 namespaceID = 2007855034 cTime = 0; checkpointTime = 1302380284708. > Expecting respectively: -18; 2007855034; 0; 1302380284709 > at org.apache.hadoop.hdfs.server.namenode.CheckpointSignature.validateStorageInfo(CheckpointSignature.java:70) > at org.apache.hadoop.hdfs.server.namenode.FSImage.validateCheckpointUpload(FSImage.java:1732) > at org.apache.hadoop.hdfs.server.namenode.GetImageServlet.doGet(GetImageServlet.java:62) > at javax.servlet.http.HttpServlet.service(HttpServlet.java:707) > at javax.servlet.http.HttpServlet.service(HttpServlet.java:820) > Solution: > When it failes to createEditLogFile, we can collect all the failed directories and can call processIOError with that storageDirectories list > {code} > synchronized void startJournalSpool(NamenodeRegistration nnReg) > throws IOException { > .................. > ................... > ArrayList errorSDs = new ArrayList(); > // create journal spool directories > for(Iterator it = > dirIterator(NameNodeDirType.EDITS); it.hasNext();) { > ................... > ................... > // create edit file if missing > File eFile = getEditFile(sd); > if(!eFile.exists()) > { > try > { > editLog.createEditLogFile(eFile); > } > catch(IOException ie) > { > LOG.error("Unable to save edits for " + sd.getRoot(), ie); > errorSDs.add(sd); > } > } > } > processIOError(errorSDs, true); > {code} -- This message is automatically generated by JIRA. For more information on JIRA, see: http://www.atlassian.com/software/jira