hbase-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From st...@apache.org
Subject hbase git commit: HBASE-17171 Proactively catch the case when no time remains for random reads
Date Wed, 23 Nov 2016 19:41:12 GMT
Repository: hbase
Updated Branches:
  refs/heads/branch-1 fb1ace490 -> 2f35956eb


HBASE-17171 Proactively catch the case when no time remains for random reads

The framework sets a configuration property to control how long reads
should be executed. When writes take too long, no time remains for reads
and the user sees an error about a property they must set. We should
prevent this case and log an appropriate message.

Also fixes a rogue character in the class-level javadoc.

Signed-off-by: Michael Stack <stack@apache.org>


Project: http://git-wip-us.apache.org/repos/asf/hbase/repo
Commit: http://git-wip-us.apache.org/repos/asf/hbase/commit/2f35956e
Tree: http://git-wip-us.apache.org/repos/asf/hbase/tree/2f35956e
Diff: http://git-wip-us.apache.org/repos/asf/hbase/diff/2f35956e

Branch: refs/heads/branch-1
Commit: 2f35956eb831c11436b785c37bed0bd93550ab99
Parents: fb1ace4
Author: Josh Elser <elserj@apache.org>
Authored: Wed Nov 23 13:25:53 2016 -0500
Committer: Michael Stack <stack@apache.org>
Committed: Wed Nov 23 11:41:04 2016 -0800

----------------------------------------------------------------------
 ...rationTestTimeBoundedRequestsWithRegionReplicas.java | 12 +++++++++++-
 1 file changed, 11 insertions(+), 1 deletion(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/hbase/blob/2f35956e/hbase-it/src/test/java/org/apache/hadoop/hbase/test/IntegrationTestTimeBoundedRequestsWithRegionReplicas.java
----------------------------------------------------------------------
diff --git a/hbase-it/src/test/java/org/apache/hadoop/hbase/test/IntegrationTestTimeBoundedRequestsWithRegionReplicas.java
b/hbase-it/src/test/java/org/apache/hadoop/hbase/test/IntegrationTestTimeBoundedRequestsWithRegionReplicas.java
index b8e939f..008c6a6 100644
--- a/hbase-it/src/test/java/org/apache/hadoop/hbase/test/IntegrationTestTimeBoundedRequestsWithRegionReplicas.java
+++ b/hbase-it/src/test/java/org/apache/hadoop/hbase/test/IntegrationTestTimeBoundedRequestsWithRegionReplicas.java
@@ -75,7 +75,7 @@ import com.google.common.collect.Lists;
  * These parameters (and some other parameters from LoadTestTool) can be used to
  * control behavior, given values are default:
  * <pre>
- * -Dhbase.DIntegrationTestTimeBoundedRequestsWithRegionReplicas.runtime=600000
+ * -Dhbase.IntegrationTestTimeBoundedRequestsWithRegionReplicas.runtime=600000
  * -DIntegrationTestTimeBoundedRequestsWithRegionReplicas.num_regions_per_server=5
  * -DIntegrationTestTimeBoundedRequestsWithRegionReplicas.get_timeout_ms=5000
  * -DIntegrationTestTimeBoundedRequestsWithRegionReplicas.num_keys_per_server=2500
@@ -202,6 +202,16 @@ public class IntegrationTestTimeBoundedRequestsWithRegionReplicas extends
Integr
     // set the intended run time for the reader. The reader will do read requests
     // to random keys for this amount of time.
     long remainingTime = runtime - (System.currentTimeMillis() - start);
+    if (remainingTime <= 0) {
+      LOG.error("The amount of time left for the test to perform random reads is "
+          + "non-positive. Increase the test execution time via "
+          + String.format(RUN_TIME_KEY,
+                IntegrationTestTimeBoundedRequestsWithRegionReplicas.class.getSimpleName())
+          + " or reduce the amount of data written per server via "
+          + IntegrationTestTimeBoundedRequestsWithRegionReplicas.class.getSimpleName()
+          + "." + IntegrationTestIngest.NUM_KEYS_PER_SERVER_KEY);
+      throw new IllegalArgumentException("No time remains to execute random reads");
+    }
     LOG.info("Reading random keys from the table for " + remainingTime/60000 + " min");
     this.conf.setLong(
       String.format(RUN_TIME_KEY, TimeBoundedMultiThreadedReader.class.getSimpleName())


Mime
View raw message