public static HRegion createHDFSRegionDir(Configuration conf, RegionInfo hri, TableDescriptor htd)
    throws IOException {
    // Create HRegion
    Path root = CommonFSUtils.getRootDir(conf);
    HRegion region = HRegion.createHRegion(hri, root, conf, htd, null);

    // Close the new region to flush to disk. Close log file too.
    region.close();
    return region;
  }
Creates, flushes, and closes a new region.
hbase-server/src/main/java/org/apache/hadoop/hbase/util/HBaseFsckRepair.java