HBASE-24226 Address other hard references to '/tmp' found in Configuration
This commit is contained in:
parent
3c1725f2f0
commit
f8ce21f096
|
@ -71,6 +71,17 @@ public class TestExportSnapshotAdjunct {
|
||||||
TestExportSnapshot.setUpBaseConf(TEST_UTIL.getConfiguration());
|
TestExportSnapshot.setUpBaseConf(TEST_UTIL.getConfiguration());
|
||||||
TEST_UTIL.startMiniCluster(3);
|
TEST_UTIL.startMiniCluster(3);
|
||||||
TEST_UTIL.startMiniMapReduceCluster();
|
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();
|
Configuration conf = TEST_UTIL.getConfiguration();
|
||||||
for (Iterator<Map.Entry<String, String>> i = conf.iterator(); i.hasNext();) {
|
for (Iterator<Map.Entry<String, String>> i = conf.iterator(); i.hasNext();) {
|
||||||
Map.Entry<String, String> e = i.next();
|
Map.Entry<String, String> e = i.next();
|
||||||
|
|
|
@ -711,11 +711,11 @@ public class HBaseTestingUtility extends HBaseZKTestingUtility {
|
||||||
setupClusterTestDir();
|
setupClusterTestDir();
|
||||||
conf.set(TEST_DIRECTORY_KEY, clusterTestDir.getPath());
|
conf.set(TEST_DIRECTORY_KEY, clusterTestDir.getPath());
|
||||||
System.setProperty(TEST_DIRECTORY_KEY, clusterTestDir.getPath());
|
System.setProperty(TEST_DIRECTORY_KEY, clusterTestDir.getPath());
|
||||||
createDirAndSetProperty("test.cache.data", "test.cache.data");
|
createDirAndSetProperty("test.cache.data");
|
||||||
createDirAndSetProperty("hadoop.tmp.dir", "hadoop.tmp.dir");
|
createDirAndSetProperty("hadoop.tmp.dir");
|
||||||
hadoopLogDir = createDirAndSetProperty("hadoop.log.dir", "hadoop.log.dir");
|
hadoopLogDir = createDirAndSetProperty("hadoop.log.dir");
|
||||||
createDirAndSetProperty("mapreduce.cluster.local.dir", "mapreduce.cluster.local.dir");
|
createDirAndSetProperty("mapreduce.cluster.local.dir");
|
||||||
createDirAndSetProperty("mapreduce.cluster.temp.dir", "mapreduce.cluster.temp.dir");
|
createDirAndSetProperty("mapreduce.cluster.temp.dir");
|
||||||
enableShortCircuit();
|
enableShortCircuit();
|
||||||
|
|
||||||
Path root = getDataTestDirOnTestFS("hadoop");
|
Path root = getDataTestDirOnTestFS("hadoop");
|
||||||
|
@ -743,6 +743,7 @@ public class HBaseTestingUtility extends HBaseZKTestingUtility {
|
||||||
createDirAndSetProperty("java.io.tmpdir");
|
createDirAndSetProperty("java.io.tmpdir");
|
||||||
createDirAndSetProperty("dfs.journalnode.edits.dir");
|
createDirAndSetProperty("dfs.journalnode.edits.dir");
|
||||||
createDirAndSetProperty("dfs.provided.aliasmap.inmemory.leveldb.dir");
|
createDirAndSetProperty("dfs.provided.aliasmap.inmemory.leveldb.dir");
|
||||||
|
createDirAndSetProperty("fs.s3a.committer.staging.tmp.path");
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
|
Loading…
Reference in New Issue