public static void blockUntilRegionSplit(Configuration conf, long timeout,
    final byte[] regionName, boolean waitForDaughters) throws IOException, InterruptedException {
    long start = EnvironmentEdgeManager.currentTime();
    log("blocking until region is split:" + Bytes.toStringBinary(regionName));
    RegionInfo daughterA = null, daughterB = null;
    try (Connection conn = ConnectionFactory.createConnection(conf);
      Table metaTable = conn.getTable(TableName.META_TABLE_NAME)) {
      Result result = null;
      RegionInfo region = null;
      while ((EnvironmentEdgeManager.currentTime() - start) < timeout) {
        result = metaTable.get(new Get(regionName));
        if (result == null) {
          break;
        }

        region = CatalogFamilyFormat.getRegionInfo(result);
        if (region.isSplitParent()) {
          log("found parent region: " + region.toString());
          PairOfSameType<RegionInfo> pair = MetaTableAccessor.getDaughterRegions(result);
          daughterA = pair.getFirst();
          daughterB = pair.getSecond();
          break;
        }
        Threads.sleep(100);
      }
      if (daughterA == null || daughterB == null) {
        throw new IOException("Failed to get daughters, daughterA=" + daughterA + ", daughterB="
          + daughterB + ", timeout=" + timeout + ", result=" + result + ", regionName="
          + Bytes.toString(regionName) + ", region=" + region);
      }

      // if we are here, this means the region split is complete or timed out
      if (waitForDaughters) {
        long rem = timeout - (EnvironmentEdgeManager.currentTime() - start);
        blockUntilRegionIsInMeta(conn, rem, daughterA);

        rem = timeout - (EnvironmentEdgeManager.currentTime() - start);
        blockUntilRegionIsInMeta(conn, rem, daughterB);

        rem = timeout - (EnvironmentEdgeManager.currentTime() - start);
        blockUntilRegionIsOpened(conf, rem, daughterA);

        rem = timeout - (EnvironmentEdgeManager.currentTime() - start);
        blockUntilRegionIsOpened(conf, rem, daughterB);

        // Compacting the new region to make sure references can be cleaned up
        compactAndBlockUntilDone(TEST_UTIL.getAdmin(),
          TEST_UTIL.getMiniHBaseCluster().getRegionServer(0), daughterA.getRegionName());
        compactAndBlockUntilDone(TEST_UTIL.getAdmin(),
          TEST_UTIL.getMiniHBaseCluster().getRegionServer(0), daughterB.getRegionName());

        removeCompactedFiles(conn, timeout, daughterA);
        removeCompactedFiles(conn, timeout, daughterB);
      }
    }
  }
Blocks until the region split is complete in hbase:meta and region server opens the daughters
hbase-server/src/test/java/org/apache/hadoop/hbase/regionserver/TestEndToEndSplitTransaction.java