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 2017/01/14 01:48:46 UTC

hbase git commit: HBASE-17464 Fix getNewDataTestDirOnTestFS to always return a unique path

Repository: hbase
Updated Branches:
  refs/heads/master cdee1a703 -> 9fd5dab1a


HBASE-17464 Fix getNewDataTestDirOnTestFS to always return a unique path

Signed-off-by: Michael Stack <st...@apache.org>


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

Branch: refs/heads/master
Commit: 9fd5dab1a8d063c438a4ea1f1d10e8a11224c573
Parents: cdee1a7
Author: Zach York <zy...@amazon.com>
Authored: Thu Jan 12 19:09:31 2017 -0800
Committer: Michael Stack <st...@apache.org>
Committed: Fri Jan 13 17:48:22 2017 -0800

----------------------------------------------------------------------
 .../test/java/org/apache/hadoop/hbase/HBaseTestingUtility.java | 6 +++---
 1 file changed, 3 insertions(+), 3 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/hbase/blob/9fd5dab1/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 47fed8d..1169bc0 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
@@ -564,13 +564,13 @@ public class HBaseTestingUtility extends HBaseCommonTestingUtility {
     //the working directory, and create a unique sub dir there
     FileSystem fs = getTestFileSystem();
     Path newDataTestDir;
+    String randomStr = UUID.randomUUID().toString();
     if (fs.getUri().getScheme().equals(FileSystem.getLocal(conf).getUri().getScheme())) {
-      File dataTestDir = new File(getDataTestDir().toString());
+      newDataTestDir = new Path(getDataTestDir(), randomStr);
+      File dataTestDir = new File(newDataTestDir.toString());
       if (deleteOnExit()) dataTestDir.deleteOnExit();
-      newDataTestDir = new Path(dataTestDir.getAbsolutePath());
     } else {
       Path base = getBaseTestDirOnTestFS();
-      String randomStr = UUID.randomUUID().toString();
       newDataTestDir = new Path(base, randomStr);
       if (deleteOnExit()) fs.deleteOnExit(newDataTestDir);
     }