protected void setupClusterTestDir() {
    if (clusterTestDir != null) {
      return;
    }

    // Using randomUUID ensures that multiple clusters can be launched by
    // a same test, if it stops & starts them
    Path testDir = getDataTestDir("cluster_" + getRandomUUID().toString());
    clusterTestDir = new File(testDir.toString()).getAbsoluteFile();
    // Have it cleaned up on exit
    boolean b = deleteOnExit();
    if (b) {
      clusterTestDir.deleteOnExit();
    }
    LOG.info("Created new mini-cluster data directory: " + clusterTestDir + ", deleteOnExit=" + b);
  }
Creates a directory for the cluster, under the test data
hbase-testing-util/src/main/java/org/apache/hadoop/hbase/HBaseZKTestingUtility.java