hbase-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From apurt...@apache.org
Subject [1/2] hbase git commit: HBASE-13878 Set hbase.fs.tmp.dir config in HBaseTestingUtility.java for Phoenix UT to use
Date Wed, 17 Jun 2015 17:11:28 GMT
Repository: hbase
Updated Branches:
  refs/heads/0.98 86bb72585 -> 5225998b1


HBASE-13878 Set hbase.fs.tmp.dir config in HBaseTestingUtility.java for Phoenix UT to use

Conflicts:
	hbase-server/src/test/java/org/apache/hadoop/hbase/HBaseTestingUtility.java


Project: http://git-wip-us.apache.org/repos/asf/hbase/repo
Commit: http://git-wip-us.apache.org/repos/asf/hbase/commit/6c3ca3c2
Tree: http://git-wip-us.apache.org/repos/asf/hbase/tree/6c3ca3c2
Diff: http://git-wip-us.apache.org/repos/asf/hbase/diff/6c3ca3c2

Branch: refs/heads/0.98
Commit: 6c3ca3c22dd148b6a48c6b675ad054390d9ed2e0
Parents: 86bb725
Author: Enis Soztutar <enis@apache.org>
Authored: Wed Jun 10 16:30:02 2015 -0700
Committer: Andrew Purtell <apurtell@apache.org>
Committed: Wed Jun 17 10:04:22 2015 -0700

----------------------------------------------------------------------
 .../org/apache/hadoop/hbase/HBaseTestingUtility.java | 15 +++++++++++++++
 1 file changed, 15 insertions(+)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/hbase/blob/6c3ca3c2/hbase-server/src/test/java/org/apache/hadoop/hbase/HBaseTestingUtility.java
----------------------------------------------------------------------
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 952024e..28b6e76 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
@@ -945,6 +945,11 @@ public class HBaseTestingUtility extends HBaseCommonTestingUtility {
 
     getHBaseAdmin(); // create immediately the hbaseAdmin
     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;
   }
 
@@ -1066,6 +1071,16 @@ public class HBaseTestingUtility extends HBaseCommonTestingUtility
{
     return hbaseRootdir;
   }
 
+  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
    * @throws IOException


Mime
View raw message