diff --git a/hbase-server/src/test/java/org/apache/hadoop/hbase/PerformanceEvaluation.java b/hbase-server/src/test/java/org/apache/hadoop/hbase/PerformanceEvaluation.java index 2e7afa5..0112396 100644 --- a/hbase-server/src/test/java/org/apache/hadoop/hbase/PerformanceEvaluation.java +++ b/hbase-server/src/test/java/org/apache/hadoop/hbase/PerformanceEvaluation.java @@ -592,7 +592,7 @@ public class PerformanceEvaluation extends Configured implements Tool { boolean flushCommits = true; boolean writeToWAL = true; boolean autoFlush = false; - boolean oneCon = false; + boolean multiCon = false; boolean useTags = false; int noOfTags = 1; boolean reportLatency = false; @@ -632,7 +632,7 @@ public class PerformanceEvaluation extends Configured implements Tool { this.flushCommits = that.flushCommits; this.writeToWAL = that.writeToWAL; this.autoFlush = that.autoFlush; - this.oneCon = that.oneCon; + this.multiCon = that.multiCon; this.useTags = that.useTags; this.noOfTags = that.noOfTags; this.reportLatency = that.reportLatency; @@ -753,8 +753,8 @@ public class PerformanceEvaluation extends Configured implements Tool { this.autoFlush = autoFlush; } - public void setOneCon(boolean oneCon) { - this.oneCon = oneCon; + public void setMultiCon(boolean mulitCon) { + this.multiCon = multiCon; } public void setUseTags(boolean useTags) { @@ -905,8 +905,8 @@ public class PerformanceEvaluation extends Configured implements Tool { return bloomType; } - public boolean isOneCon() { - return oneCon; + public boolean isMultiCon() { + return multiCon; } public int getMeasureAfter() { @@ -1019,7 +1019,7 @@ public class PerformanceEvaluation extends Configured implements Tool { } void testSetup() throws IOException { - if (!opts.oneCon) { + if (opts.multiCon) { this.connection = ConnectionFactory.createConnection(conf); } onStartup(); @@ -1033,7 +1033,7 @@ public class PerformanceEvaluation extends Configured implements Tool { reportLatency(); reportValueSize(); onTakedown(); - if (!opts.oneCon) { + if (opts.multiCon) { connection.close(); } receiverHost.closeReceivers(); @@ -1651,7 +1651,9 @@ public class PerformanceEvaluation extends Configured implements Tool { "Default: false"); System.err.println(" writeToWAL Set writeToWAL on puts. Default: True"); System.err.println(" autoFlush Set autoFlush on htable. Default: False"); - System.err.println(" oneCon all the threads share the same connection. Default: False"); + System.err.println(" oneCon deprecated, ignored. see multiCon instead."); + System.err.println(" multiCon each worker thread manages its own connection. " + + "Default: False"); System.err.println(" presplit Create presplit table. Recommended for accurate perf " + "analysis (see guide). Default: disabled"); System.err.println(" inmemory Tries to keep the HFiles of the CF " + @@ -1803,10 +1805,14 @@ public class PerformanceEvaluation extends Configured implements Tool { continue; } - final String onceCon = "--oneCon="; - if (cmd.startsWith(onceCon)) { - opts.oneCon = Boolean.parseBoolean(cmd.substring(onceCon.length())); - continue; + final String oneCon = "--oneCon="; + if (cmd.startsWith(oneCon)) { + System.err.println("--oneCon option is deprecated, it is now the default behavior."); + } + + final String multiCon = "--multiCon="; + if (cmd.startsWith(multiCon)) { + opts.multiCon = Boolean.parseBoolean(cmd.substring(multiCon.length())); } final String latency = "--latency";