You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@hbase.apache.org by st...@apache.org on 2016/11/08 20:56:01 UTC

hbase git commit: Revert "Revert "HBASE-16983 TestMultiTableSnapshotInputFormat failing with Unable to create region directory: /tmp/... (Addendum by Guanghao Zhang)"" This is a revert of a revert, i.e. puts back the change only I added HBaseCommonTestin

Repository: hbase
Updated Branches:
  refs/heads/master c3b98b87f -> 0998af01d


Revert "Revert "HBASE-16983 TestMultiTableSnapshotInputFormat failing with Unable to create region directory: /tmp/... (Addendum by Guanghao Zhang)""
This is a revert of a revert, i.e. puts back the change only I added
HBaseCommonTestingUtility#getRandomDir from branch-1 too since
missing in master branch.

This reverts commit 9afcb4366d0098c42f2ea7c5da5aed02464bda63.


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

Branch: refs/heads/master
Commit: 0998af01df4b221793f7799922a4b088d951d39a
Parents: c3b98b8
Author: Michael Stack <st...@apache.org>
Authored: Tue Nov 8 12:36:23 2016 -0800
Committer: Michael Stack <st...@apache.org>
Committed: Tue Nov 8 12:55:48 2016 -0800

----------------------------------------------------------------------
 .../apache/hadoop/hbase/HBaseCommonTestingUtility.java | 13 +++++++++----
 .../mapreduce/TestMultiTableSnapshotInputFormat.java   |  3 +--
 2 files changed, 10 insertions(+), 6 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/hbase/blob/0998af01/hbase-common/src/test/java/org/apache/hadoop/hbase/HBaseCommonTestingUtility.java
----------------------------------------------------------------------
diff --git a/hbase-common/src/test/java/org/apache/hadoop/hbase/HBaseCommonTestingUtility.java b/hbase-common/src/test/java/org/apache/hadoop/hbase/HBaseCommonTestingUtility.java
index 3cae4d2..0bf8aea 100644
--- a/hbase-common/src/test/java/org/apache/hadoop/hbase/HBaseCommonTestingUtility.java
+++ b/hbase-common/src/test/java/org/apache/hadoop/hbase/HBaseCommonTestingUtility.java
@@ -108,10 +108,7 @@ public class HBaseCommonTestingUtility {
           dataTestDir.getAbsolutePath());
       return null;
     }
-
-    String randomStr = UUID.randomUUID().toString();
-    Path testPath = new Path(getBaseTestDir(), randomStr);
-
+    Path testPath = getRandomDir();
     this.dataTestDir = new File(testPath.toString()).getAbsoluteFile();
     // Set this property so if mapreduce jobs run, they will use this as their home dir.
     System.setProperty("test.build.dir", this.dataTestDir.toString());
@@ -122,6 +119,14 @@ public class HBaseCommonTestingUtility {
     return testPath;
   }
 
+  /**
+   * @return A dir with a random (uuid) name under the test dir
+   * @see #getBaseTestDir()
+   */
+  public Path getRandomDir() {
+    return new Path(getBaseTestDir(), UUID.randomUUID().toString());
+  }
+
   protected void createSubDir(String propertyName, Path parent, String subDirName) {
     Path newPath = new Path(parent, subDirName);
     File newDir = new File(newPath.toString()).getAbsoluteFile();

http://git-wip-us.apache.org/repos/asf/hbase/blob/0998af01/hbase-server/src/test/java/org/apache/hadoop/hbase/mapreduce/TestMultiTableSnapshotInputFormat.java
----------------------------------------------------------------------
diff --git a/hbase-server/src/test/java/org/apache/hadoop/hbase/mapreduce/TestMultiTableSnapshotInputFormat.java b/hbase-server/src/test/java/org/apache/hadoop/hbase/mapreduce/TestMultiTableSnapshotInputFormat.java
index c762180..41e6780 100644
--- a/hbase-server/src/test/java/org/apache/hadoop/hbase/mapreduce/TestMultiTableSnapshotInputFormat.java
+++ b/hbase-server/src/test/java/org/apache/hadoop/hbase/mapreduce/TestMultiTableSnapshotInputFormat.java
@@ -64,8 +64,7 @@ public class TestMultiTableSnapshotInputFormat extends MultiTableInputFormatTest
 
   @Before
   public void setUp() throws Exception {
-    this.restoreDir = TEST_UTIL.getDataTestDir();
-
+    this.restoreDir = TEST_UTIL.getRandomDir();
   }
 
   @Override