@Override
  protected Path setupDataTestDir() {
    Path testPath = super.setupDataTestDir();
    if (null == testPath) {
      return null;
    }

    createSubDirAndSystemProperty("hadoop.log.dir", testPath, "hadoop-log-dir");

    // This is defaulted in core-default.xml to /tmp/hadoop-${user.name}, but
    // we want our own value to ensure uniqueness on the same machine
    createSubDirAndSystemProperty("hadoop.tmp.dir", testPath, "hadoop-tmp-dir");

    // Read and modified in org.apache.hadoop.mapred.MiniMRCluster
    createSubDir("mapreduce.cluster.local.dir", testPath, "mapred-local-dir");
    return testPath;
  }
Home our data in a dir under {@link #DEFAULT_BASE_TEST_DIRECTORY}. Give it a random name so can
have many concurrent tests running if we need to. Moding a System property is not the way to do
concurrent instances -- another instance could grab the temporary value unintentionally -- but
not anything can do about it at moment; single instance only is how the minidfscluster works.
We also create the underlying directory names for hadoop.log.dir, mapreduce.cluster.local.dir
and hadoop.tmp.dir, and set the values in the conf, and as a system property for hadoop.tmp.dir
(We do not create them!).
@return The calculated data test build directory, if newly-created.
hbase-server/src/test/java/org/apache/hadoop/hbase/HBaseTestingUtil.java