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 6C7F34814 for ; Tue, 5 Jul 2011 21:20:39 +0000 (UTC) Received: (qmail 85269 invoked by uid 500); 5 Jul 2011 21:20:39 -0000 Delivered-To: apmail-hbase-issues-archive@hbase.apache.org Received: (qmail 85199 invoked by uid 500); 5 Jul 2011 21:20:38 -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 85191 invoked by uid 99); 5 Jul 2011 21:20:38 -0000 Received: from athena.apache.org (HELO athena.apache.org) (140.211.11.136) by apache.org (qpsmtpd/0.29) with ESMTP; Tue, 05 Jul 2011 21:20:38 +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; Tue, 05 Jul 2011 21:20:37 +0000 Received: from hel.zones.apache.org (hel.zones.apache.org [140.211.11.116]) by hel.zones.apache.org (Postfix) with ESMTP id A144644BEA for ; Tue, 5 Jul 2011 21:20:16 +0000 (UTC) Date: Tue, 5 Jul 2011 21:20:16 +0000 (UTC) From: "Ted Yu (JIRA)" To: issues@hbase.apache.org Message-ID: <1599022357.1865.1309900816657.JavaMail.tomcat@hel.zones.apache.org> In-Reply-To: <563570594.33.1309859002332.JavaMail.tomcat@hel.zones.apache.org> Subject: [jira] [Updated] (HBASE-4061) getTableDirs is missing directories to skip 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-4061?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ] Ted Yu updated HBASE-4061: -------------------------- Attachment: (was: 4061.txt) > getTableDirs is missing directories to skip > ------------------------------------------- > > Key: HBASE-4061 > URL: https://issues.apache.org/jira/browse/HBASE-4061 > Project: HBase > Issue Type: Bug > Components: util > Affects Versions: 0.92.0 > Reporter: Lars George > Assignee: Ted Yu > Fix For: 0.92.0 > > Attachments: 4061.txt > > > The getTableDirs() is missing extra checks: > {code} > public static List getTableDirs(final FileSystem fs, final Path rootdir) > throws IOException { > // presumes any directory under hbase.rootdir is a table > FileStatus [] dirs = fs.listStatus(rootdir, new DirFilter(fs)); > List tabledirs = new ArrayList(dirs.length); > for (FileStatus dir: dirs) { > Path p = dir.getPath(); > String tableName = p.getName(); > if (tableName.equals(HConstants.HREGION_LOGDIR_NAME) || > tableName.equals(Bytes.toString(HConstants.ROOT_TABLE_NAME)) || > tableName.equals(Bytes.toString(HConstants.META_TABLE_NAME)) || > tableName.equals(HConstants.HREGION_OLDLOGDIR_NAME) ) { > continue; > } > tabledirs.add(p); > } > return tabledirs; > } > {code} > It needs to also skip > * .tmp > * .corrupt > * splitlog > A broader check should be performed to make sure it is all covered. > The missing .corrupt check causes for example: > {noformat} > 2011-07-05 11:34:33,364 WARN org.apache.hadoop.hbase.master.HMaster: Failed getting all descriptors > java.io.FileNotFoundException: No status for hdfs://localhost:8020/hbase/.corrupt > at org.apache.hadoop.hbase.util.FSUtils.getTableInfoModtime(FSUtils.java:888) > at org.apache.hadoop.hbase.util.FSTableDescriptors.get(FSTableDescriptors.java:122) > at org.apache.hadoop.hbase.util.FSTableDescriptors.getAll(FSTableDescriptors.java:149) > at org.apache.hadoop.hbase.master.HMaster.getHTableDescriptors(HMaster.java:1429) > 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.hbase.ipc.WritableRpcEngine$Server.call(WritableRpcEngine.java:312) > at org.apache.hadoop.hbase.ipc.HBaseServer$Handler.run(HBaseServer.java:1065) > {noformat} > Not sure yet why others do not have this issue, could be me being on trunk and fiddling? -- This message is automatically generated by JIRA. For more information on JIRA, see: http://www.atlassian.com/software/jira