From 7c45f021104c4965c7e870dc0972e5663c4faa86 Mon Sep 17 00:00:00 2001 From: Michael Stack Date: Wed, 20 Jun 2018 22:25:21 -0700 Subject: [PATCH] HBASE-20778 Make it so WALPE runs on DFS --- .../hadoop/hbase/wal/WALPerformanceEvaluation.java | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/hbase-server/src/test/java/org/apache/hadoop/hbase/wal/WALPerformanceEvaluation.java b/hbase-server/src/test/java/org/apache/hadoop/hbase/wal/WALPerformanceEvaluation.java index 9a8bddfc921..e04ade6dc18 100644 --- a/hbase-server/src/test/java/org/apache/hadoop/hbase/wal/WALPerformanceEvaluation.java +++ b/hbase-server/src/test/java/org/apache/hadoop/hbase/wal/WALPerformanceEvaluation.java @@ -117,7 +117,6 @@ public final class WALPerformanceEvaluation extends Configured implements Tool { @Override public void setConf(Configuration conf) { super.setConf(conf); - TEST_UTIL = new HBaseTestingUtility(conf); } /** @@ -301,11 +300,15 @@ public final class WALPerformanceEvaluation extends Configured implements Tool { // In regionserver, number of handlers == number of threads. getConf().setInt(HConstants.REGION_SERVER_HANDLER_COUNT, numThreads); + if (rootRegionDir == null) { + TEST_UTIL = new HBaseTestingUtility(getConf()); + rootRegionDir = TEST_UTIL.getDataTestDirOnTestFS("WALPerformanceEvaluation"); + } // Run WAL Performance Evaluation // First set the fs from configs. In case we are on hadoop1 FSUtils.setFsDefault(getConf(), FSUtils.getRootDir(getConf())); FileSystem fs = FileSystem.get(getConf()); - LOG.info("FileSystem: " + fs); + LOG.info("FileSystem={}, rootDir={}", fs, rootRegionDir); SpanReceiverHost receiverHost = trace ? SpanReceiverHost.getInstance(getConf()) : null; final Sampler sampler = trace ? Sampler.ALWAYS : Sampler.NEVER; @@ -313,9 +316,6 @@ public final class WALPerformanceEvaluation extends Configured implements Tool { TraceScope scope = TraceUtil.createTrace("WALPerfEval"); try { - if (rootRegionDir == null) { - rootRegionDir = TEST_UTIL.getDataTestDirOnTestFS("WALPerformanceEvaluation"); - } rootRegionDir = rootRegionDir.makeQualified(fs.getUri(), fs.getWorkingDirectory()); cleanRegionRootDir(fs, rootRegionDir); FSUtils.setRootDir(getConf(), rootRegionDir);