public static void closeRegionSilentlyAndWait(Connection connection, ServerName server,
    RegionInfo region) throws IOException, InterruptedException {
    long timeout = connection.getConfiguration().getLong("hbase.hbck.close.timeout", 120000);
    // this is a bit ugly but it is only used in the old hbck and tests, so I think it is fine.
    try (AsyncClusterConnection asyncConn = ClusterConnectionFactory
      .createAsyncClusterConnection(connection.getConfiguration(), null, User.getCurrent())) {
      ServerManager.closeRegionSilentlyAndWait(asyncConn, server, region, timeout);
    }
  }
Contacts a region server and waits up to hbase.hbck.close.timeout ms (default 120s) to close
the region. This bypasses the active hmaster.
hbase-server/src/main/java/org/apache/hadoop/hbase/util/HBaseFsckRepair.java