private void undeployRegions(HbckRegionInfo hi) throws IOException, InterruptedException {
    undeployRegionsForHbi(hi);
    // undeploy replicas of the region (but only if the method is invoked for the primary)
    if (hi.getReplicaId() != RegionInfo.DEFAULT_REPLICA_ID) {
      return;
    }
    int numReplicas = admin.getDescriptor(hi.getTableName()).getRegionReplication();
    for (int i = 1; i < numReplicas; i++) {
      if (hi.getPrimaryHRIForDeployedReplica() == null) continue;
      RegionInfo hri =
        RegionReplicaUtil.getRegionInfoForReplica(hi.getPrimaryHRIForDeployedReplica(), i);
      HbckRegionInfo h = regionInfoMap.get(hri.getEncodedName());
      if (h != null) {
        undeployRegionsForHbi(h);
        // set skip checks; we undeployed it, and we don't want to evaluate this anymore
        // in consistency checks
        h.setSkipChecks(true);
      }
    }
  }
Attempts to undeploy a region from a region server based in information in META. Any operations
that modify the file system should make sure that its corresponding region is not deployed to
prevent data races. A separate call is required to update the master in-memory region state
kept in the AssignementManager. Because disable uses this state instead of that found in META,
we can't seem to cleanly disable/delete tables that have been hbck fixed. When used on a
version of HBase that does not have the offline ipc call exposed on the master (&lt;0.90.5,
&lt;0.92.0) a master restart or failover may be required.
hbase-server/src/main/java/org/apache/hadoop/hbase/util/HBaseFsck.java