Return-Path: X-Original-To: apmail-hbase-issues-archive@www.apache.org Delivered-To: apmail-hbase-issues-archive@www.apache.org Received: from mail.apache.org (hermes.apache.org [140.211.11.3]) by minotaur.apache.org (Postfix) with SMTP id 249C7DE95 for ; Wed, 5 Sep 2012 15:31:09 +0000 (UTC) Received: (qmail 92317 invoked by uid 500); 5 Sep 2012 15:31:08 -0000 Delivered-To: apmail-hbase-issues-archive@hbase.apache.org Received: (qmail 92258 invoked by uid 500); 5 Sep 2012 15:31:08 -0000 Mailing-List: contact issues-help@hbase.apache.org; run by ezmlm Precedence: bulk List-Help: List-Unsubscribe: List-Post: List-Id: Delivered-To: mailing list issues@hbase.apache.org Received: (qmail 92196 invoked by uid 99); 5 Sep 2012 15:31:07 -0000 Received: from arcas.apache.org (HELO arcas.apache.org) (140.211.11.28) by apache.org (qpsmtpd/0.29) with ESMTP; Wed, 05 Sep 2012 15:31:07 +0000 Date: Thu, 6 Sep 2012 02:31:07 +1100 (NCT) From: "Jonathan Hsieh (JIRA)" To: issues@hbase.apache.org Message-ID: <936571820.39287.1346859067943.JavaMail.jiratomcat@arcas> In-Reply-To: <2131426892.11731.1332549087589.JavaMail.tomcat@hel.zones.apache.org> Subject: [jira] [Commented] (HBASE-5631) hbck should handle case where .tableinfo file is missing. 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/HBASE-5631?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=13448823#comment-13448823 ] Jonathan Hsieh commented on HBASE-5631: --------------------------------------- Have you tried shutting down the cluster and then restarting it? I have a suspicion that this may not work if the HTD isn't cached. Could you modify the test (add a few lines) from HBASE-6516 to verify that this patch fixes the table? {code} + HTableDescriptor[] htds = getHTableDescriptors(tmpList); // this goes to master which goes to the filesystem.... {code} ---- Nits: instead of this: {code} + Path hbaseRoot = new Path(conf.get(HConstants.HBASE_DIR)); {code} use this: {code} FSUtils.getRootDir(conf); {code} Are we purposely updating the passed in array? could we just use tmpList? {code} + List tmpList = new ArrayList(); + tmpList.addAll(orphanTableDirs); + HTableDescriptor[] htds = getHTableDescriptors(tmpList); + Iterator iter = orphanTableDirs.iterator(); + int j = 0; + while (iter.hasNext()) { + String tableName = (String) iter.next(); + {code} I wasn't consistent with error.print vs log. I think I prefer log. Any reason you picked this vs the other? {code} + errors.print("Try to fix orphan table: " + tableName); .. + errors.print("fixing table: " + tableName); .. + errors.report("Failed to fix orphan table: " + tableName); {code} typo/reword: hfsck -> hbck, "It is strongly recommended that you re-run hbck manually since orphan table dirs have been fixed" {code} + LOG.warn("Strongly recommend to re-run manually hfsck after all orphanTableDirs being fixed"); {code} > hbck should handle case where .tableinfo file is missing. > --------------------------------------------------------- > > Key: HBASE-5631 > URL: https://issues.apache.org/jira/browse/HBASE-5631 > Project: HBase > Issue Type: Improvement > Components: hbck > Affects Versions: 0.92.2, 0.94.0, 0.96.0 > Reporter: Jonathan Hsieh > Assignee: Jie Huang > Attachments: hbase-5631.patch > > > 0.92+ branches have a .tableinfo file which could be missing from hdfs. hbck should be able to detect and repair this properly. -- 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