@Override
    public void handleOverlapGroup(Collection<HbckRegionInfo> overlap) throws IOException {
      Preconditions.checkNotNull(overlap);
      Preconditions.checkArgument(overlap.size() > 0);

      if (!this.fixOverlaps) {
        LOG.warn("Not attempting to repair overlaps.");
        return;
      }

      if (overlap.size() > hbck.getMaxMerge()) {
        LOG.warn(
          "Overlap group has " + overlap.size() + " overlapping " + "regions which is greater than "
            + hbck.getMaxMerge() + ", the max number of regions to merge");
        if (hbck.shouldSidelineBigOverlaps()) {
          // we only sideline big overlapped groups that exceeds the max number of regions to merge
          sidelineBigOverlaps(overlap);
        }
        return;
      }
      if (hbck.shouldRemoveParents()) {
        removeParentsAndFixSplits(overlap);
      }
      mergeOverlaps(overlap);
    }
This takes set of overlapping regions and merges them into a single region. This covers cases
like degenerate regions, shared start key, general overlaps, duplicate ranges, and partial
overlapping regions. Cases: - Clean regions that overlap - Only .oldlogs regions (can't find
start/stop range, or figure out) This is basically threadsafe, except for the fixer increment
in mergeOverlaps.
hbase-server/src/main/java/org/apache/hadoop/hbase/util/HbckTableInfo.java