HBASE-20778 Make it so WALPE runs on DFS

This commit is contained in:
Michael Stack 2018-06-20 22:25:21 -07:00
parent 959d9c16f3
commit daad14428d
1 changed files with 5 additions and 5 deletions

View File

@ -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);