hbase-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From ramkris...@apache.org
Subject hbase git commit: HBASE-15697 Excessive TestHRegion running time on branch-1 (Ram)
Date Thu, 28 Apr 2016 08:55:52 GMT
Repository: hbase
Updated Branches:
  refs/heads/master 9343ef438 -> 889d89a74


HBASE-15697 Excessive TestHRegion running time on branch-1 (Ram)


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

Branch: refs/heads/master
Commit: 889d89a74c8b1ae6ce7a0f70a63073bbe7708e88
Parents: 9343ef4
Author: Ramkrishna <ramkrishna.s.vasudevan@intel.com>
Authored: Thu Apr 28 14:24:39 2016 +0530
Committer: Ramkrishna <ramkrishna.s.vasudevan@intel.com>
Committed: Thu Apr 28 14:24:39 2016 +0530

----------------------------------------------------------------------
 .../hadoop/hbase/regionserver/TestHRegion.java       | 15 +++++++--------
 1 file changed, 7 insertions(+), 8 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/hbase/blob/889d89a7/hbase-server/src/test/java/org/apache/hadoop/hbase/regionserver/TestHRegion.java
----------------------------------------------------------------------
diff --git a/hbase-server/src/test/java/org/apache/hadoop/hbase/regionserver/TestHRegion.java
b/hbase-server/src/test/java/org/apache/hadoop/hbase/regionserver/TestHRegion.java
index 713c8e5..e48a6c2 100644
--- a/hbase-server/src/test/java/org/apache/hadoop/hbase/regionserver/TestHRegion.java
+++ b/hbase-server/src/test/java/org/apache/hadoop/hbase/regionserver/TestHRegion.java
@@ -3874,6 +3874,9 @@ public class TestHRegion {
 
         if (i != 0 && i % compactInterval == 0) {
           region.compact(true);
+          for (Store store : region.getStores()) {
+            store.closeAndArchiveCompactedFiles();
+          }
         }
 
         if (i != 0 && i % flushInterval == 0) {
@@ -4040,19 +4043,15 @@ public class TestHRegion {
 
       // Add a thread that flushes as fast as possible
       ctx.addThread(new RepeatingTestThread(ctx) {
-        private int flushesSinceCompact = 0;
-        private final int maxFlushesSinceCompact = 20;
 
         @Override
         public void doAnAction() throws Exception {
-          if (region.flush(true).isCompactionNeeded()) {
-            ++flushesSinceCompact;
-          }
+          region.flush(true);
           // Compact regularly to avoid creating too many files and exceeding
           // the ulimit.
-          if (flushesSinceCompact == maxFlushesSinceCompact) {
-            region.compact(false);
-            flushesSinceCompact = 0;
+          region.compact(false);
+          for (Store store : region.getStores()) {
+            store.closeAndArchiveCompactedFiles();
           }
         }
       });


Mime
View raw message