You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@hbase.apache.org by dd...@apache.org on 2014/05/24 18:18:40 UTC
git commit: HBASE-10818. Addendum to reduce the number of times sleep
happens in the coprocessor. Also,
puts back code to set consistency that got deleted by accident in the last
commit.
Repository: hbase
Updated Branches:
refs/heads/hbase-10070 0abda799a -> 2e6476ee3
HBASE-10818. Addendum to reduce the number of times sleep happens in the coprocessor. Also, puts back code to set consistency that got deleted by accident in the last commit.
Project: http://git-wip-us.apache.org/repos/asf/hbase/repo
Commit: http://git-wip-us.apache.org/repos/asf/hbase/commit/2e6476ee
Tree: http://git-wip-us.apache.org/repos/asf/hbase/tree/2e6476ee
Diff: http://git-wip-us.apache.org/repos/asf/hbase/diff/2e6476ee
Branch: refs/heads/hbase-10070
Commit: 2e6476ee306d0fa5201df139a0da8673d28d1a05
Parents: 0abda79
Author: Devaraj Das <dd...@Devaraj-Dass-MacBook-Pro-2.local>
Authored: Sat May 24 09:18:31 2014 -0700
Committer: Devaraj Das <dd...@Devaraj-Dass-MacBook-Pro-2.local>
Committed: Sat May 24 09:18:31 2014 -0700
----------------------------------------------------------------------
.../hadoop/hbase/mapreduce/IntegrationTestBulkLoad.java | 10 ++++++++--
1 file changed, 8 insertions(+), 2 deletions(-)
----------------------------------------------------------------------
http://git-wip-us.apache.org/repos/asf/hbase/blob/2e6476ee/hbase-it/src/test/java/org/apache/hadoop/hbase/mapreduce/IntegrationTestBulkLoad.java
----------------------------------------------------------------------
diff --git a/hbase-it/src/test/java/org/apache/hadoop/hbase/mapreduce/IntegrationTestBulkLoad.java b/hbase-it/src/test/java/org/apache/hadoop/hbase/mapreduce/IntegrationTestBulkLoad.java
index 4112014..fa02f3c 100644
--- a/hbase-it/src/test/java/org/apache/hadoop/hbase/mapreduce/IntegrationTestBulkLoad.java
+++ b/hbase-it/src/test/java/org/apache/hadoop/hbase/mapreduce/IntegrationTestBulkLoad.java
@@ -156,7 +156,7 @@ public class IntegrationTestBulkLoad extends IntegrationTestBase {
@Override
public RegionScanner preScannerOpen(final ObserverContext<RegionCoprocessorEnvironment> e,
final Scan scan, final RegionScanner s) throws IOException {
- if (countOfOpen.incrementAndGet() % 4 == 0) { //slowdown openScanner randomly
+ if (countOfOpen.incrementAndGet() == 2) { //slowdown openScanner randomly
slowdownCode(e);
}
return s;
@@ -168,7 +168,8 @@ public class IntegrationTestBulkLoad extends IntegrationTestBase {
final int limit, final boolean hasMore) throws IOException {
//this will slow down a certain next operation if the conditions are met. The slowness
//will allow the call to go to a replica
- if (countOfNext.incrementAndGet() % 4 == 0) {
+ countOfNext.incrementAndGet();
+ if (countOfNext.get() == 0 || countOfNext.get() == 4) {
slowdownCode(e);
}
return true;
@@ -655,6 +656,11 @@ public class IntegrationTestBulkLoad extends IntegrationTestBase {
scan.setCacheBlocks(false);
scan.setBatch(1000);
+ int replicaCount = conf.getInt(NUM_REPLICA_COUNT_KEY, NUM_REPLICA_COUNT_DEFAULT);
+ if (replicaCount != NUM_REPLICA_COUNT_DEFAULT) {
+ scan.setConsistency(Consistency.TIMELINE);
+ }
+
TableMapReduceUtil.initTableMapperJob(
Bytes.toBytes(getTablename()),
scan,