HBASE-20778 Make it so WALPE runs on DFS
This commit is contained in:
parent
959d9c16f3
commit
daad14428d
|
@ -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);
|
||||
|
|
Loading…
Reference in New Issue