Index: src/java/org/apache/hadoop/hbase/master/HMaster.java =================================================================== --- src/java/org/apache/hadoop/hbase/master/HMaster.java (revision 934525) +++ src/java/org/apache/hadoop/hbase/master/HMaster.java (working copy) @@ -277,20 +277,20 @@ // created here in bootstap and it'll need to be cleaned up. Better to // not make it in first place. Turn off block caching for bootstrap. // Enable after. - setBlockCaching(HRegionInfo.ROOT_REGIONINFO, false); - setBlockCaching(HRegionInfo.FIRST_META_REGIONINFO, false); - HRegion root = HRegion.createHRegion(HRegionInfo.ROOT_REGIONINFO, - this.rootdir, this.conf); - HRegion meta = HRegion.createHRegion(HRegionInfo.FIRST_META_REGIONINFO, - this.rootdir, this.conf); + HRegionInfo rootHRI = new HRegionInfo(HRegionInfo.ROOT_REGIONINFO); + setBlockCaching(rootHRI, false); + HRegionInfo metaHRI = new HRegionInfo(HRegionInfo.FIRST_META_REGIONINFO); + setBlockCaching(metaHRI, false); + HRegion root = HRegion.createHRegion(rootHRI, this.rootdir, this.conf); + HRegion meta = HRegion.createHRegion(metaHRI, this.rootdir, this.conf); + setBlockCaching(rootHRI, true); + setBlockCaching(metaHRI, true); // Add first region from the META table to the ROOT region. HRegion.addRegionToMETA(root, meta); root.close(); root.getLog().closeAndDelete(); meta.close(); meta.getLog().closeAndDelete(); - setBlockCaching(HRegionInfo.ROOT_REGIONINFO, true); - setBlockCaching(HRegionInfo.FIRST_META_REGIONINFO, true); } catch (IOException e) { e = RemoteExceptionHandler.checkIOException(e); LOG.error("bootstrap", e);