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/18 01:18:12 UTC
[hbase] branch branch-2 updated: HBASE-23838 Adding debug logging
to a few ExportSnapshot tests ADDENDUM 2: More logging to debug.
This is an automated email from the ASF dual-hosted git repository.
stack pushed a commit to branch branch-2
in repository https://gitbox.apache.org/repos/asf/hbase.git
The following commit(s) were added to refs/heads/branch-2 by this push:
new c5b1b3e HBASE-23838 Adding debug logging to a few ExportSnapshot tests ADDENDUM 2: More logging to debug.
c5b1b3e is described below
commit c5b1b3e259b2295229bbe36e5c3fbd14b71ec1cc
Author: stack <st...@apache.org>
AuthorDate: Mon Feb 17 17:17:40 2020 -0800
HBASE-23838 Adding debug logging to a few ExportSnapshot tests
ADDENDUM 2: More logging to debug.
---
.../java/org/apache/hadoop/hbase/snapshot/ExportSnapshot.java | 4 ++--
.../org/apache/hadoop/hbase/snapshot/TestExportSnapshot.java | 9 ++++++---
.../hadoop/hbase/snapshot/TestExportSnapshotV1NoCluster.java | 2 +-
3 files changed, 9 insertions(+), 6 deletions(-)
diff --git a/hbase-mapreduce/src/main/java/org/apache/hadoop/hbase/snapshot/ExportSnapshot.java b/hbase-mapreduce/src/main/java/org/apache/hadoop/hbase/snapshot/ExportSnapshot.java
index 36b75c4..198ae97 100644
--- a/hbase-mapreduce/src/main/java/org/apache/hadoop/hbase/snapshot/ExportSnapshot.java
+++ b/hbase-mapreduce/src/main/java/org/apache/hadoop/hbase/snapshot/ExportSnapshot.java
@@ -978,8 +978,8 @@ public class ExportSnapshot extends AbstractHBaseTool implements Tool {
Path outputSnapshotDir = SnapshotDescriptionUtils.getCompletedSnapshotDir(targetName, outputRoot);
Path initialOutputSnapshotDir = skipTmp ? outputSnapshotDir : snapshotTmpDir;
LOG.debug("inputFs={}, inputRoot={}", inputFs.getUri().toString(), inputRoot);
- LOG.debug("outputFs={}, outputRoot={}, outputFs.getUri().toString(), " +
- "initialOutputSnapshotDir={}", outputRoot.toString(), skipTmp, initialOutputSnapshotDir);
+ LOG.debug("outputFs={}, outputRoot={}, skipTmp={}, initialOutputSnapshotDir={}",
+ outputFs, outputRoot.toString(), skipTmp, initialOutputSnapshotDir);
// Find the necessary directory which need to change owner and group
Path needSetOwnerDir = SnapshotDescriptionUtils.getSnapshotRootDir(outputRoot);
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 99d9d65..ac916fd 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
@@ -87,13 +87,15 @@ public class TestExportSnapshot {
public static void setUpBaseConf(Configuration conf) {
conf.setBoolean(SnapshotManager.HBASE_SNAPSHOT_ENABLED, true);
conf.setInt("hbase.regionserver.msginterval", 100);
+ // If a single node has enough failures (default 3), resource manager will blacklist it.
+ // With only 2 nodes and tests injecting faults, we don't want that.
+ conf.setInt("mapreduce.job.maxtaskfailures.per.tracker", 100);
+ /*
conf.setInt("hbase.client.pause", 250);
conf.setInt(HConstants.HBASE_CLIENT_RETRIES_NUMBER, 6);
conf.setBoolean("hbase.master.enabletable.roundrobin", true);
conf.setInt("mapreduce.map.maxattempts", 10);
- // If a single node has enough failures (default 3), resource manager will blacklist it.
- // With only 2 nodes and tests injecting faults, we don't want that.
- conf.setInt("mapreduce.job.maxtaskfailures.per.tracker", 100);
+ */
}
@BeforeClass
@@ -213,6 +215,7 @@ public class TestExportSnapshot {
final RegionPredicate bypassregionPredicate, boolean success) throws Exception {
URI hdfsUri = FileSystem.get(conf).getUri();
FileSystem fs = FileSystem.get(copyDir.toUri(), conf);
+ LOG.info("DEBUG FS {} {} {}, hdfsUri={}", fs, copyDir, copyDir.toUri(), hdfsUri);
copyDir = copyDir.makeQualified(fs.getUri(), fs.getWorkingDirectory());
List<String> opts = new ArrayList<>();
opts.add("--snapshot");
diff --git a/hbase-mapreduce/src/test/java/org/apache/hadoop/hbase/snapshot/TestExportSnapshotV1NoCluster.java b/hbase-mapreduce/src/test/java/org/apache/hadoop/hbase/snapshot/TestExportSnapshotV1NoCluster.java
index 9b57cb7..8110320 100644
--- a/hbase-mapreduce/src/test/java/org/apache/hadoop/hbase/snapshot/TestExportSnapshotV1NoCluster.java
+++ b/hbase-mapreduce/src/test/java/org/apache/hadoop/hbase/snapshot/TestExportSnapshotV1NoCluster.java
@@ -113,7 +113,7 @@ public class TestExportSnapshotV1NoCluster {
static Path getDestinationDir(HBaseCommonTestingUtility hctu, Path testDir) throws IOException {
FileSystem fs = FileSystem.get(hctu.getConfiguration());
Path path = new Path(new Path(testDir, "export-test"),
- "export-" + System.currentTimeMillis()).makeQualified(fs.getUri(), testDir);
+ "export-" + System.currentTimeMillis()).makeQualified(fs.getUri(), fs.getWorkingDirectory());
LOG.info("HDFS export destination path: " + path);
return path;
}