HBASE-13878 Set hbase.fs.tmp.dir config in HBaseTestingUtility.java for Phoenix UT to use
This commit is contained in:
parent
0f93986015
commit
399fddddc3
|
@ -1035,6 +1035,11 @@ public class HBaseTestingUtility extends HBaseCommonTestingUtility {
|
||||||
|
|
||||||
getHBaseAdmin(); // create immediately the hbaseAdmin
|
getHBaseAdmin(); // create immediately the hbaseAdmin
|
||||||
LOG.info("Minicluster is up");
|
LOG.info("Minicluster is up");
|
||||||
|
|
||||||
|
// Set the hbase.fs.tmp.dir config to make sure that we have some default value. This is
|
||||||
|
// for tests that do not read hbase-defaults.xml
|
||||||
|
setHBaseFsTmpDir();
|
||||||
|
|
||||||
return (MiniHBaseCluster)this.hbaseCluster;
|
return (MiniHBaseCluster)this.hbaseCluster;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -1196,6 +1201,17 @@ public class HBaseTestingUtility extends HBaseCommonTestingUtility {
|
||||||
return createRootDir(false);
|
return createRootDir(false);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
private void setHBaseFsTmpDir() throws IOException {
|
||||||
|
String hbaseFsTmpDirInString = this.conf.get("hbase.fs.tmp.dir");
|
||||||
|
if (hbaseFsTmpDirInString == null) {
|
||||||
|
this.conf.set("hbase.fs.tmp.dir", getDataTestDirOnTestFS("hbase-staging").toString());
|
||||||
|
LOG.info("Setting hbase.fs.tmp.dir to " + this.conf.get("hbase.fs.tmp.dir"));
|
||||||
|
} else {
|
||||||
|
LOG.info("The hbase.fs.tmp.dir is set to " + hbaseFsTmpDirInString);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Flushes all caches in the mini hbase cluster
|
* Flushes all caches in the mini hbase cluster
|
||||||
* @throws IOException
|
* @throws IOException
|
||||||
|
|
Loading…
Reference in New Issue