public SingleProcessHBaseCluster startMiniCluster(StartTestingClusterOption option)
    throws Exception {
    LOG.info("Starting up minicluster with option: {}", option);

    // If we already put up a cluster, fail.
    if (miniClusterRunning) {
      throw new IllegalStateException("A mini-cluster is already running");
    }
    miniClusterRunning = true;

    setupClusterTestDir();

    // Bring up mini dfs cluster. This spews a bunch of warnings about missing
    // scheme. Complaints are 'Scheme is undefined for build/test/data/dfs/name1'.
    if (dfsCluster == null) {
      LOG.info("STARTING DFS");
      dfsCluster = startMiniDFSCluster(option.getNumDataNodes(), option.getDataNodeHosts());
    } else {
      LOG.info("NOT STARTING DFS");
    }

    // Start up a zk cluster.
    if (getZkCluster() == null) {
      startMiniZKCluster(option.getNumZkServers());
    }

    // Start the MiniHBaseCluster
    return startMiniHBaseCluster(option);
  }
Start up a mini cluster of hbase, optionally dfs and zookeeper if needed. It modifies
Configuration. It homes the cluster data directory under a random subdirectory in a directory
under System property test.build.data, to be cleaned up on exit.
@see #shutdownMiniDFSCluster()
hbase-server/src/test/java/org/apache/hadoop/hbase/HBaseTestingUtil.java