diff --git a/hbase-mapreduce/src/test/java/org/apache/hadoop/hbase/snapshot/TestExportSnapshotAdjunct.java b/hbase-mapreduce/src/test/java/org/apache/hadoop/hbase/snapshot/TestExportSnapshotAdjunct.java index b8702b9e816..4e4e71ffdf6 100644 --- a/hbase-mapreduce/src/test/java/org/apache/hadoop/hbase/snapshot/TestExportSnapshotAdjunct.java +++ b/hbase-mapreduce/src/test/java/org/apache/hadoop/hbase/snapshot/TestExportSnapshotAdjunct.java @@ -71,6 +71,17 @@ public class TestExportSnapshotAdjunct { TestExportSnapshot.setUpBaseConf(TEST_UTIL.getConfiguration()); TEST_UTIL.startMiniCluster(3); TEST_UTIL.startMiniMapReduceCluster(); + } + + /** + * Check for references to '/tmp'. We are trying to avoid having references to outside of the + * test data dir when running tests. References outside of the test dir makes it so concurrent + * tests can stamp on each other by mistake. This check is for references to the 'tmp'. + * + * This is a strange place for this test but I want somewhere where the configuration is + * full -- filed w/ hdfs and mapreduce configurations. + */ + private void checkForReferencesToTmpDir() { Configuration conf = TEST_UTIL.getConfiguration(); for (Iterator> i = conf.iterator(); i.hasNext();) { Map.Entry e = i.next(); diff --git a/hbase-server/src/test/java/org/apache/hadoop/hbase/HBaseTestingUtility.java b/hbase-server/src/test/java/org/apache/hadoop/hbase/HBaseTestingUtility.java index 38b28d2d48d..d4f7e9f69a1 100644 --- a/hbase-server/src/test/java/org/apache/hadoop/hbase/HBaseTestingUtility.java +++ b/hbase-server/src/test/java/org/apache/hadoop/hbase/HBaseTestingUtility.java @@ -711,11 +711,11 @@ public class HBaseTestingUtility extends HBaseZKTestingUtility { setupClusterTestDir(); conf.set(TEST_DIRECTORY_KEY, clusterTestDir.getPath()); System.setProperty(TEST_DIRECTORY_KEY, clusterTestDir.getPath()); - createDirAndSetProperty("test.cache.data", "test.cache.data"); - createDirAndSetProperty("hadoop.tmp.dir", "hadoop.tmp.dir"); - hadoopLogDir = createDirAndSetProperty("hadoop.log.dir", "hadoop.log.dir"); - createDirAndSetProperty("mapreduce.cluster.local.dir", "mapreduce.cluster.local.dir"); - createDirAndSetProperty("mapreduce.cluster.temp.dir", "mapreduce.cluster.temp.dir"); + createDirAndSetProperty("test.cache.data"); + createDirAndSetProperty("hadoop.tmp.dir"); + hadoopLogDir = createDirAndSetProperty("hadoop.log.dir"); + createDirAndSetProperty("mapreduce.cluster.local.dir"); + createDirAndSetProperty("mapreduce.cluster.temp.dir"); enableShortCircuit(); Path root = getDataTestDirOnTestFS("hadoop"); @@ -743,6 +743,7 @@ public class HBaseTestingUtility extends HBaseZKTestingUtility { createDirAndSetProperty("java.io.tmpdir"); createDirAndSetProperty("dfs.journalnode.edits.dir"); createDirAndSetProperty("dfs.provided.aliasmap.inmemory.leveldb.dir"); + createDirAndSetProperty("fs.s3a.committer.staging.tmp.path"); } /**