static boolean cleanMergeRegion(MasterServices services, final RegionInfo mergedRegion,
    List<RegionInfo> parents) throws IOException {
    if (LOG.isDebugEnabled()) {
      LOG.debug("Cleaning merged region {}", mergedRegion);
    }

    Pair<Boolean, Boolean> result =
      checkRegionReferences(services, mergedRegion.getTable(), mergedRegion);

    if (hasNoReferences(result)) {
      if (LOG.isDebugEnabled()) {
        LOG.debug(
          "Deleting parents ({}) from fs; merged child {} no longer holds references", parents
            .stream().map(r -> RegionInfo.getShortNameToLog(r)).collect(Collectors.joining(", ")),
          mergedRegion);
      }

      ProcedureExecutor<MasterProcedureEnv> pe = services.getMasterProcedureExecutor();
      GCMultipleMergedRegionsProcedure mergeRegionProcedure =
        new GCMultipleMergedRegionsProcedure(pe.getEnvironment(), mergedRegion, parents);
      pe.submitProcedure(mergeRegionProcedure);
      if (LOG.isDebugEnabled()) {
        LOG.debug("Submitted procedure {} for merged region {}", mergeRegionProcedure,
          mergedRegion);
      }
      return true;
    } else {
      if (LOG.isDebugEnabled()) {
        LOG.debug(
          "Deferring cleanup up of {} parents of merged region {}, because references "
            + "still exist in merged region or we encountered an exception in checking",
          parents.size(), mergedRegion.getEncodedName());
      }
    }

    return false;
  }
If merged region no longer holds reference to the merge regions, archive merge region on hdfs
and perform deleting references in hbase:meta
@return true if we delete references in merged region on hbase:meta and archive the files on
        the file system
hbase-server/src/main/java/org/apache/hadoop/hbase/master/janitor/CatalogJanitor.java