private static void bootstrap(final Path rd, final Configuration c)
 throws IOException {
   LOG.info("BOOTSTRAP: creating ROOT and first META regions");
   try {
     // Bootstrapping, make sure blockcache is off.  Else, one will be
     // 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.
     HRegionInfo rootHRI = new HRegionInfo(HRegionInfo.ROOT_REGIONINFO);
     setInfoFamilyCachingForRoot(false);
     HRegionInfo metaHRI = new HRegionInfo(HRegionInfo.FIRST_META_REGIONINFO);
     setInfoFamilyCachingForMeta(false);
     HRegion root = HRegion.createHRegion(rootHRI, rd, c,
         HTableDescriptor.ROOT_TABLEDESC);
     HRegion meta = HRegion.createHRegion(metaHRI, rd, c,
         HTableDescriptor.META_TABLEDESC);
     setInfoFamilyCachingForRoot(true);
     setInfoFamilyCachingForMeta(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();
   } catch (IOException e) {
     e = RemoteExceptionHandler.checkIOException(e);
     LOG.error("bootstrap", e);
     throw e;
   }
 }