You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@hbase.apache.org by nd...@apache.org on 2014/10/22 19:19:50 UTC
git commit: HBASE-12317 Run IntegrationTestRegionReplicaPerf w.o
mapred
Repository: hbase
Updated Branches:
refs/heads/master d70e2b124 -> ebe8db586
HBASE-12317 Run IntegrationTestRegionReplicaPerf w.o mapred
Project: http://git-wip-us.apache.org/repos/asf/hbase/repo
Commit: http://git-wip-us.apache.org/repos/asf/hbase/commit/ebe8db58
Tree: http://git-wip-us.apache.org/repos/asf/hbase/tree/ebe8db58
Diff: http://git-wip-us.apache.org/repos/asf/hbase/diff/ebe8db58
Branch: refs/heads/master
Commit: ebe8db58691a49a40c0bd43c20e00bc3e40b192c
Parents: d70e2b1
Author: Nick Dimiduk <nd...@apache.org>
Authored: Tue Oct 21 17:28:33 2014 -0700
Committer: Nick Dimiduk <nd...@apache.org>
Committed: Wed Oct 22 10:18:28 2014 -0700
----------------------------------------------------------------------
.../hbase/IntegrationTestRegionReplicaPerf.java | 16 ++++------------
1 file changed, 4 insertions(+), 12 deletions(-)
----------------------------------------------------------------------
http://git-wip-us.apache.org/repos/asf/hbase/blob/ebe8db58/hbase-it/src/test/java/org/apache/hadoop/hbase/IntegrationTestRegionReplicaPerf.java
----------------------------------------------------------------------
diff --git a/hbase-it/src/test/java/org/apache/hadoop/hbase/IntegrationTestRegionReplicaPerf.java b/hbase-it/src/test/java/org/apache/hadoop/hbase/IntegrationTestRegionReplicaPerf.java
index cc22e43..8d3292f 100644
--- a/hbase-it/src/test/java/org/apache/hadoop/hbase/IntegrationTestRegionReplicaPerf.java
+++ b/hbase-it/src/test/java/org/apache/hadoop/hbase/IntegrationTestRegionReplicaPerf.java
@@ -66,8 +66,6 @@ public class IntegrationTestRegionReplicaPerf extends IntegrationTestBase {
private static final String SLEEP_TIME_DEFAULT = "" + (10 * 1000l);
private static final String TABLE_NAME_KEY = "tableName";
private static final String TABLE_NAME_DEFAULT = "IntegrationTestRegionReplicaPerf";
- private static final String NOMAPRED_KEY = "nomapred";
- private static final boolean NOMAPRED_DEFAULT = false;
private static final String REPLICA_COUNT_KEY = "replicas";
private static final String REPLICA_COUNT_DEFAULT = "" + 3;
private static final String PRIMARY_TIMEOUT_KEY = "timeout";
@@ -77,7 +75,6 @@ public class IntegrationTestRegionReplicaPerf extends IntegrationTestBase {
private TableName tableName;
private long sleepTime;
- private boolean nomapred = NOMAPRED_DEFAULT;
private int replicaCount;
private int primaryTimeout;
private int clusterSize;
@@ -177,8 +174,6 @@ public class IntegrationTestRegionReplicaPerf extends IntegrationTestBase {
+ TABLE_NAME_DEFAULT + "'");
addOptWithArg(SLEEP_TIME_KEY, "How long the monkey sleeps between actions. Default: "
+ SLEEP_TIME_DEFAULT);
- addOptNoArg(NOMAPRED_KEY,
- "Run multiple clients using threads (rather than use mapreduce)");
addOptWithArg(REPLICA_COUNT_KEY, "Number of region replicas. Default: "
+ REPLICA_COUNT_DEFAULT);
addOptWithArg(PRIMARY_TIMEOUT_KEY, "Overrides hbase.client.primaryCallTimeout. Default: "
@@ -191,7 +186,6 @@ public class IntegrationTestRegionReplicaPerf extends IntegrationTestBase {
protected void processOptions(CommandLine cmd) {
tableName = TableName.valueOf(cmd.getOptionValue(TABLE_NAME_KEY, TABLE_NAME_DEFAULT));
sleepTime = Long.parseLong(cmd.getOptionValue(SLEEP_TIME_KEY, SLEEP_TIME_DEFAULT));
- nomapred = cmd.hasOption(NOMAPRED_KEY);
replicaCount = Integer.parseInt(cmd.getOptionValue(REPLICA_COUNT_KEY, REPLICA_COUNT_DEFAULT));
primaryTimeout =
Integer.parseInt(cmd.getOptionValue(PRIMARY_TIMEOUT_KEY, PRIMARY_TIMEOUT_DEFAULT));
@@ -199,7 +193,6 @@ public class IntegrationTestRegionReplicaPerf extends IntegrationTestBase {
LOG.debug(Objects.toStringHelper("Parsed Options")
.add(TABLE_NAME_KEY, tableName)
.add(SLEEP_TIME_KEY, sleepTime)
- .add(NOMAPRED_KEY, nomapred)
.add(REPLICA_COUNT_KEY, replicaCount)
.add(PRIMARY_TIMEOUT_KEY, primaryTimeout)
.add(NUM_RS_KEY, clusterSize)
@@ -224,14 +217,13 @@ public class IntegrationTestRegionReplicaPerf extends IntegrationTestBase {
public void test() throws Exception {
int maxIters = 3;
- String mr = nomapred ? "--nomapred" : "";
String replicas = "--replicas=" + replicaCount;
// TODO: splits disabled until "phase 2" is complete.
String splitPolicy = "--splitPolicy=" + DisabledRegionSplitPolicy.class.getName();
- String writeOpts = format("%s %s --table=%s --presplit=16 sequentialWrite 4",
- mr, splitPolicy, tableName);
+ String writeOpts = format("%s --nomapred --table=%s --presplit=16 sequentialWrite 4",
+ splitPolicy, tableName);
String readOpts =
- format("%s --table=%s --latency --sampleRate=0.1 randomRead 4", mr, tableName);
+ format("--nomapred --table=%s --latency --sampleRate=0.1 randomRead 4", tableName);
String replicaReadOpts = format("%s %s", replicas, readOpts);
ArrayList<TimingResult> resultsWithoutReplica = new ArrayList<TimingResult>(maxIters);
@@ -258,7 +250,7 @@ public class IntegrationTestRegionReplicaPerf extends IntegrationTestBase {
// disable monkey, enable region replicas, enable monkey
cleanUpMonkey("Altering table.");
LOG.debug("Altering " + tableName + " replica count to " + replicaCount);
- util.setReplicas(util.getHBaseAdmin(), tableName, replicaCount);
+ IntegrationTestingUtility.setReplicas(util.getHBaseAdmin(), tableName, replicaCount);
setUpMonkey();
startMonkey();