public MiniDFSCluster startMiniDFSCluster(int servers, final String racks[], String hosts[])
    throws Exception {
    createDirsAndSetProperties();
    EditLogFileOutputStream.setShouldSkipFsyncForTesting(true);

    this.dfsCluster =
      new MiniDFSCluster(0, this.conf, servers, true, true, true, null, racks, hosts, null);
    this.dfsClusterFixer = new FsDatasetAsyncDiskServiceFixer(dfsCluster);
    this.dfsClusterFixer.start();
    // Set this just-started cluster as our filesystem.
    setFs();

    // Wait for the cluster to be totally up
    this.dfsCluster.waitClusterUp();

    // reset the test directory for test file system
    dataTestDirOnTestFS = null;
    String dataTestDir = getDataTestDir().toString();
    conf.set(HConstants.HBASE_DIR, dataTestDir);
    LOG.debug("Setting {} to {}", HConstants.HBASE_DIR, dataTestDir);

    return this.dfsCluster;
  }
Start a minidfscluster. Can only create one.
@param servers How many DNs to start.
@param hosts   hostnames DNs to run on.
@see #shutdownMiniDFSCluster()
@return The mini dfs cluster created.
hbase-testing-util/src/main/java/org/apache/hadoop/hbase/HBaseTestingUtility.java