public SingleProcessHBaseCluster startMiniHBaseCluster(StartTestingClusterOption option)
    throws IOException, InterruptedException {
    // Now do the mini hbase cluster. Set the hbase.rootdir in config.
    createRootDir(option.isCreateRootDir());
    if (option.isCreateWALDir()) {
      createWALRootDir();
    }
    // Set the hbase.fs.tmp.dir config to make sure that we have some default value. This is
    // for tests that do not read hbase-defaults.xml
    setHBaseFsTmpDir();

    // These settings will make the server waits until this exact number of
    // regions servers are connected.
    if (conf.getInt(ServerManager.WAIT_ON_REGIONSERVERS_MINTOSTART, -1) == -1) {
      conf.setInt(ServerManager.WAIT_ON_REGIONSERVERS_MINTOSTART, option.getNumRegionServers());
    }
    if (conf.getInt(ServerManager.WAIT_ON_REGIONSERVERS_MAXTOSTART, -1) == -1) {
      conf.setInt(ServerManager.WAIT_ON_REGIONSERVERS_MAXTOSTART, option.getNumRegionServers());
    }

    Configuration c = new Configuration(this.conf);
    this.hbaseCluster = new SingleProcessHBaseCluster(c, option.getNumMasters(),
      option.getNumAlwaysStandByMasters(), option.getNumRegionServers(), option.getRsPorts(),
      option.getMasterClass(), option.getRsClass());
    // Populate the master address configuration from mini cluster configuration.
    conf.set(HConstants.MASTER_ADDRS_KEY, MasterRegistry.getMasterAddr(c));
    // Don't leave here till we've done a successful scan of the hbase:meta
    try (Table t = getConnection().getTable(TableName.META_TABLE_NAME);
      ResultScanner s = t.getScanner(new Scan())) {
      for (;;) {
        if (s.next() == null) {
          break;
        }
      }
    }

    getAdmin(); // create immediately the hbaseAdmin
    LOG.info("Minicluster is up; activeMaster={}", getHBaseCluster().getMaster());

    return (SingleProcessHBaseCluster) hbaseCluster;
  }
Starts up mini hbase cluster. Usually you won't want this. You'll usually want
{@link #startMiniCluster()}. This is useful when doing stepped startup of clusters.
@return Reference to the hbase mini hbase cluster.
@see #startMiniCluster(StartTestingClusterOption)
@see #shutdownMiniHBaseCluster()
hbase-server/src/test/java/org/apache/hadoop/hbase/HBaseTestingUtil.java