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 2020/02/15 00:10:02 UTC
[hbase] branch master updated: HBASE-23838 Adding debug logging to
a few ExportSnapshot tests ADDENDUM to fix failing TestExportSnapshot
This is an automated email from the ASF dual-hosted git repository.
stack 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 0e96638 HBASE-23838 Adding debug logging to a few ExportSnapshot tests ADDENDUM to fix failing TestExportSnapshot
0e96638 is described below
commit 0e966388981ab24e38294659b8822cf1351ca5bc
Author: stack <st...@apache.org>
AuthorDate: Fri Feb 14 16:08:50 2020 -0800
HBASE-23838 Adding debug logging to a few ExportSnapshot tests
ADDENDUM to fix failing TestExportSnapshot
---
.../org/apache/hadoop/hbase/snapshot/TestExportSnapshot.java | 9 +++------
1 file changed, 3 insertions(+), 6 deletions(-)
diff --git a/hbase-mapreduce/src/test/java/org/apache/hadoop/hbase/snapshot/TestExportSnapshot.java b/hbase-mapreduce/src/test/java/org/apache/hadoop/hbase/snapshot/TestExportSnapshot.java
index 1c3362e..cfdca30 100644
--- a/hbase-mapreduce/src/test/java/org/apache/hadoop/hbase/snapshot/TestExportSnapshot.java
+++ b/hbase-mapreduce/src/test/java/org/apache/hadoop/hbase/snapshot/TestExportSnapshot.java
@@ -213,8 +213,7 @@ public class TestExportSnapshot {
final RegionPredicate bypassregionPredicate, boolean success) throws Exception {
URI hdfsUri = FileSystem.get(conf).getUri();
FileSystem fs = FileSystem.get(copyDir.toUri(), conf);
- copyDir = copyDir.makeQualified(hdfsUri, copyDir);
-
+ copyDir = copyDir.makeQualified(fs.getUri(), fs.getWorkingDirectory());
List<String> opts = new ArrayList<>();
opts.add("--snapshot");
opts.add(snapshotName);
@@ -227,10 +226,8 @@ public class TestExportSnapshot {
if (overwrite) opts.add("--overwrite");
// Export Snapshot
- ExportSnapshot es = new ExportSnapshot();
- es.setConf(conf);
- int res = run(conf, es, opts.toArray(new String[opts.size()]));
- assertEquals(success ? 0 : 1, res);
+ int res = run(conf, new ExportSnapshot(), opts.toArray(new String[opts.size()]));
+ assertEquals("success " + success + ", res=" + res, success ? 0 : 1, res);
if (!success) {
final Path targetDir = new Path(HConstants.SNAPSHOT_DIR_NAME, targetName);
assertFalse(copyDir.toString() + " " + targetDir.toString(),