public static void deleteRegionFromFileSystem(final Configuration conf, final FileSystem fs,
    final Path tableDir, final RegionInfo regionInfo) throws IOException {
    HRegionFileSystem regionFs = new HRegionFileSystem(conf, fs, tableDir, regionInfo);
    Path regionDir = regionFs.getRegionDir();

    if (!fs.exists(regionDir)) {
      LOG.warn("Trying to delete a region that do not exists on disk: " + regionDir);
      return;
    }

    if (LOG.isDebugEnabled()) {
      LOG.debug("DELETING region " + regionDir);
    }

    // Archive region
    Path rootDir = CommonFSUtils.getRootDir(conf);
    HFileArchiver.archiveRegion(conf, fs, rootDir, tableDir, regionDir);

    // Delete empty region dir
    if (!fs.delete(regionDir, true)) {
      LOG.warn("Failed delete of " + regionDir);
    }
  }
Remove the region from the table directory, archiving the region's hfiles.
@param conf       the {@link Configuration} to use
@param fs         {@link FileSystem} from which to remove the region
@param tableDir   {@link Path} to where the table is being stored
@param regionInfo {@link RegionInfo} for region to be deleted
@throws IOException if the request cannot be completed
hbase-server/src/main/java/org/apache/hadoop/hbase/regionserver/HRegionFileSystem.java