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-14969 Add throughput controller for flush; ADDENDUM
Date Mon, 01 Feb 2016 16:08:15 GMT
Repository: hbase
Updated Branches:
  refs/heads/branch-1 71d66a6ac -> 3cc80e37c


HBASE-14969 Add throughput controller for flush; ADDENDUM


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

Branch: refs/heads/branch-1
Commit: 3cc80e37c6c4e3c94b531340f96716c29d02bd12
Parents: 71d66a6
Author: stack <stack@apache.org>
Authored: Mon Feb 1 08:08:07 2016 -0800
Committer: stack <stack@apache.org>
Committed: Mon Feb 1 08:08:07 2016 -0800

----------------------------------------------------------------------
 .../throttle/TestFlushWithThroughputController.java         | 9 ++++++---
 1 file changed, 6 insertions(+), 3 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/hbase/blob/3cc80e37/hbase-server/src/test/java/org/apache/hadoop/hbase/regionserver/throttle/TestFlushWithThroughputController.java
----------------------------------------------------------------------
diff --git a/hbase-server/src/test/java/org/apache/hadoop/hbase/regionserver/throttle/TestFlushWithThroughputController.java
b/hbase-server/src/test/java/org/apache/hadoop/hbase/regionserver/throttle/TestFlushWithThroughputController.java
index 5d5be87..8908c71 100644
--- a/hbase-server/src/test/java/org/apache/hadoop/hbase/regionserver/throttle/TestFlushWithThroughputController.java
+++ b/hbase-server/src/test/java/org/apache/hadoop/hbase/regionserver/throttle/TestFlushWithThroughputController.java
@@ -168,9 +168,6 @@ public class TestFlushWithThroughputController {
     conf.setInt(PressureAwareFlushThroughputController.HBASE_HSTORE_FLUSH_THROUGHPUT_TUNE_PERIOD,
       3000);
     TEST_UTIL.startMiniCluster(1);
-    assertEquals(10L * 1024 * 1024,
-      ((PressureAwareThroughputController) TEST_UTIL.getMiniHBaseCluster().getRegionServer(0)
-          .getFlushThroughputController()).getMaxThroughput(), EPSILON);
     Connection conn = ConnectionFactory.createConnection(conf);
     try {
       HTableDescriptor htd = new HTableDescriptor(tableName);
@@ -181,6 +178,12 @@ public class TestFlushWithThroughputController {
       HRegionServer regionServer = TEST_UTIL.getRSForFirstRegionInTable(tableName);
       PressureAwareFlushThroughputController throughputController =
           (PressureAwareFlushThroughputController) regionServer.getFlushThroughputController();
+      for (Region region : regionServer.getOnlineRegions()) {
+        region.flush(true);
+      }
+      assertEquals(0.0, regionServer.getFlushPressure(), EPSILON);
+      Thread.sleep(5000);
+      assertEquals(10L * 1024 * 1024, throughputController.getMaxThroughput(), EPSILON);
       Table table = conn.getTable(tableName);
       Random rand = new Random();
       for (int i = 0; i < 10; i++) {


Mime
View raw message