hbase-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From ndimi...@apache.org
Subject git commit: HBASE-12317 Run IntegrationTestRegionReplicaPerf w.o mapred
Date Wed, 22 Oct 2014 17:19:56 GMT
Repository: hbase
Updated Branches:
  refs/heads/branch-1 f0cf56f6f -> d50dfb4b4


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/d50dfb4b
Tree: http://git-wip-us.apache.org/repos/asf/hbase/tree/d50dfb4b
Diff: http://git-wip-us.apache.org/repos/asf/hbase/diff/d50dfb4b

Branch: refs/heads/branch-1
Commit: d50dfb4b43de1035c465b1e8ce9e14d2d7dc5206
Parents: f0cf56f
Author: Nick Dimiduk <ndimiduk@apache.org>
Authored: Tue Oct 21 17:28:33 2014 -0700
Committer: Nick Dimiduk <ndimiduk@apache.org>
Committed: Wed Oct 22 10:17:41 2014 -0700

----------------------------------------------------------------------
 .../hbase/IntegrationTestRegionReplicaPerf.java     | 16 ++++------------
 1 file changed, 4 insertions(+), 12 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/hbase/blob/d50dfb4b/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 160dc66..4fba36c 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
@@ -65,8 +65,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";
@@ -76,7 +74,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;
@@ -176,8 +173,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:
"
@@ -190,7 +185,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));
@@ -198,7 +192,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)
@@ -223,14 +216,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);
@@ -257,7 +249,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();
 


Mime
View raw message