This is an automated email from the ASF dual-hosted git repository.
sershe pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/hbase.git
The following commit(s) were added to refs/heads/master by this push:
new 2c8b813 HBASE-22194 Snapshot unittests fail on Windows due to invalid file path
uri
2c8b813 is described below
commit 2c8b813810dfc4a1dbdc84b5d071bfb457ff3f95
Author: Bahram Chechrazy <bachehra@microsoft.com>
AuthorDate: Thu Apr 11 11:33:52 2019 -0700
HBASE-22194 Snapshot unittests fail on Windows due to invalid file path uri
Signed-off-by: Sergey Shelukhin <sershe@apache.org>
---
.../hbase/snapshot/TestExportSnapshotWithTemporaryDirectory.java | 2 +-
.../hadoop/hbase/client/TestSnapshotDFSTemporaryDirectory.java | 6 +++---
.../apache/hadoop/hbase/client/TestSnapshotTemporaryDirectory.java | 2 +-
3 files changed, 5 insertions(+), 5 deletions(-)
diff --git a/hbase-mapreduce/src/test/java/org/apache/hadoop/hbase/snapshot/TestExportSnapshotWithTemporaryDirectory.java
b/hbase-mapreduce/src/test/java/org/apache/hadoop/hbase/snapshot/TestExportSnapshotWithTemporaryDirectory.java
index fca5358..ce1ddca 100644
--- a/hbase-mapreduce/src/test/java/org/apache/hadoop/hbase/snapshot/TestExportSnapshotWithTemporaryDirectory.java
+++ b/hbase-mapreduce/src/test/java/org/apache/hadoop/hbase/snapshot/TestExportSnapshotWithTemporaryDirectory.java
@@ -55,6 +55,6 @@ public class TestExportSnapshotWithTemporaryDirectory extends TestExportSnapshot
public static void setUpBaseConf(Configuration conf) {
TestExportSnapshot.setUpBaseConf(conf);
- conf.set(SnapshotDescriptionUtils.SNAPSHOT_WORKING_DIR, "file://" + TEMP_DIR + "/.tmpdir/");
+ conf.set(SnapshotDescriptionUtils.SNAPSHOT_WORKING_DIR, "file://" + new Path(TEMP_DIR,
".tmpdir").toUri());
}
}
\ No newline at end of file
diff --git a/hbase-server/src/test/java/org/apache/hadoop/hbase/client/TestSnapshotDFSTemporaryDirectory.java
b/hbase-server/src/test/java/org/apache/hadoop/hbase/client/TestSnapshotDFSTemporaryDirectory.java
index aff05e5..b4cef33 100644
--- a/hbase-server/src/test/java/org/apache/hadoop/hbase/client/TestSnapshotDFSTemporaryDirectory.java
+++ b/hbase-server/src/test/java/org/apache/hadoop/hbase/client/TestSnapshotDFSTemporaryDirectory.java
@@ -72,8 +72,8 @@ public class TestSnapshotDFSTemporaryDirectory
conf.set(HConstants.HBASE_REGION_SPLIT_POLICY_KEY,
ConstantSizeRegionSplitPolicy.class.getName());
- conf.set(SnapshotDescriptionUtils.SNAPSHOT_WORKING_DIR, UTIL.getDefaultRootDirPath().toString()
- + Path.SEPARATOR + UUID.randomUUID().toString() + Path.SEPARATOR + ".tmpdir"
- + Path.SEPARATOR);
+ String snapshotPath = UTIL.getDefaultRootDirPath().toString() + Path.SEPARATOR +
+ UUID.randomUUID().toString() + Path.SEPARATOR + ".tmpdir" + Path.SEPARATOR;
+ conf.set(SnapshotDescriptionUtils.SNAPSHOT_WORKING_DIR, "file://" + new Path(snapshotPath).toUri());
}
}
diff --git a/hbase-server/src/test/java/org/apache/hadoop/hbase/client/TestSnapshotTemporaryDirectory.java
b/hbase-server/src/test/java/org/apache/hadoop/hbase/client/TestSnapshotTemporaryDirectory.java
index 0f7cff1..a8561d0 100644
--- a/hbase-server/src/test/java/org/apache/hadoop/hbase/client/TestSnapshotTemporaryDirectory.java
+++ b/hbase-server/src/test/java/org/apache/hadoop/hbase/client/TestSnapshotTemporaryDirectory.java
@@ -121,7 +121,7 @@ public class TestSnapshotTemporaryDirectory {
conf.setBoolean(SnapshotManager.HBASE_SNAPSHOT_ENABLED, true);
conf.set(HConstants.HBASE_REGION_SPLIT_POLICY_KEY,
ConstantSizeRegionSplitPolicy.class.getName());
- conf.set(SnapshotDescriptionUtils.SNAPSHOT_WORKING_DIR, "file://" + TEMP_DIR + "/.tmpdir/");
+ conf.set(SnapshotDescriptionUtils.SNAPSHOT_WORKING_DIR, "file://" + new Path(TEMP_DIR,
".tmpDir").toUri());
}
@Before public void setup() throws Exception {
|