You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@hbase.apache.org by st...@apache.org on 2016/11/23 19:40:47 UTC
hbase git commit: HBASE-17171 Proactively catch the case when no time
remains for random reads
Repository: hbase
Updated Branches:
refs/heads/master a6f3057db -> c50a79a9e
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 <st...@apache.org>
Project: http://git-wip-us.apache.org/repos/asf/hbase/repo
Commit: http://git-wip-us.apache.org/repos/asf/hbase/commit/c50a79a9
Tree: http://git-wip-us.apache.org/repos/asf/hbase/tree/c50a79a9
Diff: http://git-wip-us.apache.org/repos/asf/hbase/diff/c50a79a9
Branch: refs/heads/master
Commit: c50a79a9eea06b592a73d7f689f2f85f025298bc
Parents: a6f3057
Author: Josh Elser <el...@apache.org>
Authored: Wed Nov 23 13:25:53 2016 -0500
Committer: Michael Stack <st...@apache.org>
Committed: Wed Nov 23 11:40:40 2016 -0800
----------------------------------------------------------------------
...rationTestTimeBoundedRequestsWithRegionReplicas.java | 12 +++++++++++-
1 file changed, 11 insertions(+), 1 deletion(-)
----------------------------------------------------------------------
http://git-wip-us.apache.org/repos/asf/hbase/blob/c50a79a9/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 3d60e5f..d6bed79 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
@@ -73,7 +73,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
@@ -200,6 +200,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())