private void compactRegion(final Path tableDir, final TableDescriptor htd, final Path regionDir,
      final boolean compactOnce, final boolean major) throws IOException {
      RegionInfo hri = HRegionFileSystem.loadRegionInfoFileContent(fs, regionDir);
      for (Path familyDir : FSUtils.getFamilyDirs(fs, regionDir)) {
        compactStoreFiles(tableDir, htd, hri, familyDir.getName(), compactOnce, major);
      }
    }
Execute the compaction on the specified path.
@param path        Directory path on which to run compaction.
@param compactOnce Execute just a single step of compaction.
@param major       Request major compaction.
hbase-mapreduce/src/main/java/org/apache/hadoop/hbase/regionserver/CompactionTool.java