void offline(byte[] regionName) throws IOException {
    String regionString = Bytes.toStringBinary(regionName);
    if (!rsSupportsOffline) {
      LOG.warn("Using unassign region " + regionString
        + " instead of using offline method, you should" + " restart HMaster after these repairs");
      admin.unassign(regionName, true);
      return;
    }

    // first time we assume the rs's supports #offline.
    try {
      LOG.info("Offlining region " + regionString);
      admin.offline(regionName);
    } catch (IOException ioe) {
      String notFoundMsg =
        "java.lang.NoSuchMethodException: " + "org.apache.hadoop.hbase.master.HMaster.offline([B)";
      if (ioe.getMessage().contains(notFoundMsg)) {
        LOG.warn(
          "Using unassign region " + regionString + " instead of using offline method, you should"
            + " restart HMaster after these repairs");
        rsSupportsOffline = false; // in the future just use unassign
        admin.unassign(regionName, true);
        return;
      }
      throw ioe;
    }
  }
This backwards-compatibility wrapper for permanently offlining a region that should not be
alive. If the region server does not support the "offline" method, it will use the closest
unassign method instead. This will basically work until one attempts to disable or delete the
affected table. The problem has to do with in-memory only master state, so restarting the
HMaster or failing over to another should fix this.
hbase-server/src/main/java/org/apache/hadoop/hbase/util/HBaseFsck.java