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 3D0427F10 for ; Sat, 3 Dec 2011 21:21:04 +0000 (UTC) Received: (qmail 43669 invoked by uid 500); 3 Dec 2011 21:21:04 -0000 Delivered-To: apmail-hbase-issues-archive@hbase.apache.org Received: (qmail 43635 invoked by uid 500); 3 Dec 2011 21:21:04 -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 43627 invoked by uid 99); 3 Dec 2011 21:21:04 -0000 Received: from nike.apache.org (HELO nike.apache.org) (192.87.106.230) by apache.org (qpsmtpd/0.29) with ESMTP; Sat, 03 Dec 2011 21:21:04 +0000 X-ASF-Spam-Status: No, hits=-2001.2 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; Sat, 03 Dec 2011 21:21:01 +0000 Received: from hel.zones.apache.org (hel.zones.apache.org [140.211.11.116]) by hel.zones.apache.org (Postfix) with ESMTP id E1A93C3E95 for ; Sat, 3 Dec 2011 21:20:39 +0000 (UTC) Date: Sat, 3 Dec 2011 21:20:39 +0000 (UTC) From: "Ted Yu (Created) (JIRA)" To: issues@hbase.apache.org Message-ID: <2103263862.37808.1322947239925.JavaMail.tomcat@hel.zones.apache.org> Subject: [jira] [Created] (HBASE-4942) HMaster is unable to start of HFile V1 is used MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: quoted-printable X-JIRA-FingerPrint: 30527f35849b9dde25b450d4833f0394 X-Virus-Checked: Checked by ClamAV on apache.org HMaster is unable to start of HFile V1 is used ---------------------------------------------- Key: HBASE-4942 URL: https://issues.apache.org/jira/browse/HBASE-4942 Project: HBase Issue Type: Bug Components: io Affects Versions: 0.92.0 Reporter: Ted Yu Fix For: 0.92.0, 0.94.0 This was reported by HH Zhu (zhh200910@gmail.com) If the following is specified in hbase-site.xml=EF=BC=9A {code} hfile.format.version 1 {code} Clear the hdfs directory "hbase.rootdir" so that MasterFileSystem.bootstrap= () is executed. You would see: {code} java.lang.NullPointerException at org.apache.hadoop.hbase.io.hfile.HFileReaderV1.close(HFileReaderV1.j= ava:358) at org.apache.hadoop.hbase.regionserver.StoreFile$Reader.close(StoreFil= e.java:1083) at org.apache.hadoop.hbase.regionserver.StoreFile.closeReader(StoreFile= .java:570) at org.apache.hadoop.hbase.regionserver.Store.close(Store.java:441) at org.apache.hadoop.hbase.regionserver.HRegion.doClose(HRegion.java:78= 2) at org.apache.hadoop.hbase.regionserver.HRegion.close(HRegion.java:717) at org.apache.hadoop.hbase.regionserver.HRegion.close(HRegion.java:688) at org.apache.hadoop.hbase.master.MasterFileSystem.bootstrap(MasterFile= System.java:390) at org.apache.hadoop.hbase.master.MasterFileSystem.checkRootDir(MasterF= ileSystem.java:356) at org.apache.hadoop.hbase.master.MasterFileSystem.createInitialFileSys= temLayout(MasterFileSystem.java:128) at org.apache.hadoop.hbase.master.MasterFileSystem.(MasterFileSys= tem.java:113) at org.apache.hadoop.hbase.master.HMaster.finishInitialization(HMaster.= java:435) at org.apache.hadoop.hbase.master.HMaster.run(HMaster.java:314) at java.lang.Thread.run(Thread.java:619) {code} The above exception would lead to: {code} java.lang.RuntimeException: HMaster Aborted at org.apache.hadoop.hbase.master.HMasterCommandLine.startMaster(HMaste= rCommandLine.java:152) at org.apache.hadoop.hbase.master.HMasterCommandLine.run(HMasterCommand= Line.java:103) at org.apache.hadoop.util.ToolRunner.run(ToolRunner.java:65) at org.apache.hadoop.hbase.util.ServerCommandLine.doMain(ServerCommandL= ine.java:76) at org.apache.hadoop.hbase.master.HMaster.main(HMaster.java:1512) {code} In org.apache.hadoop.hbase.master.HMaster.HMaster(Configuration conf), we h= ave: {code} this.conf.setFloat(CacheConfig.HFILE_BLOCK_CACHE_SIZE_KEY, 0.0f); {code} When CacheConfig is instantiated, the following is called: {code} org.apache.hadoop.hbase.io.hfile.CacheConfig.instantiateBlockCache(Configur= ation conf) {code} Since "hfile.block.cache.size" is 0.0, instantiateBlockCache() would return= null, resulting in blockCache field of CacheConfig to be null. When master closes Root region, org.apache.hadoop.hbase.io.hfile.HFileReade= rV1.close(boolean evictOnClose) would be called. cacheConf.getBlockCache() = returns null, leading to master abort. The following should be called in HFileReaderV1.close(), similar to the cod= e in HFileReaderV2.close(): {code} if (evictOnClose && cacheConf.isBlockCacheEnabled()) {code} -- This message is automatically generated by JIRA. If you think it was sent incorrectly, please contact your JIRA administrato= rs: https://issues.apache.org/jira/secure/ContactAdministrators!default.jsp= a For more information on JIRA, see: http://www.atlassian.com/software/jira