hbase git commit: HBASE-21097 Flush pressure assertion may fail in testFlushThroughputTuning
Repository: hbase Updated Branches: refs/heads/branch-2.0 d6ab91506 -> 307578b70 HBASE-21097 Flush pressure assertion may fail in testFlushThroughputTuning Amending-Author: Duo Zhang Signed-off-by: Duo Zhang Project: http://git-wip-us.apache.org/repos/asf/hbase/repo Commit: http://git-wip-us.apache.org/repos/asf/hbase/commit/307578b7 Tree: http://git-wip-us.apache.org/repos/asf/hbase/tree/307578b7 Diff: http://git-wip-us.apache.org/repos/asf/hbase/diff/307578b7 Branch: refs/heads/branch-2.0 Commit: 307578b7014d79e136a298f4454c09858ac41a84 Parents: d6ab915 Author: Ted Yu Authored: Sat Sep 15 18:19:36 2018 +0800 Committer: zhangduo Committed: Sat Sep 15 18:44:23 2018 +0800 -- .../throttle/TestFlushWithThroughputController.java | 8 +++- 1 file changed, 7 insertions(+), 1 deletion(-) -- http://git-wip-us.apache.org/repos/asf/hbase/blob/307578b7/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 1c39646..1f72b65 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 @@ -177,12 +177,18 @@ public class TestFlushWithThroughputController { .build()); hbtu.waitTableAvailable(tableName); HRegionServer regionServer = hbtu.getRSForFirstRegionInTable(tableName); +double pressure = regionServer.getFlushPressure(); +LOG.debug("Flush pressure before flushing: " + pressure); PressureAwareFlushThroughputController throughputController = (PressureAwareFlushThroughputController) regionServer.getFlushThroughputController(); for (HRegion region : regionServer.getRegions()) { region.flush(true); } -assertEquals(0.0, regionServer.getFlushPressure(), EPSILON); +// We used to assert that the flush pressure is zero but after HBASE-15787 or HBASE-18294 we +// changed to use heapSize instead of dataSize to calculate the flush pressure, and since +// heapSize will never be zero, so flush pressure will never be zero either. So we changed the +// assertion here. +assertTrue(regionServer.getFlushPressure() < pressure); Thread.sleep(5000); boolean tablesOnMaster = LoadBalancer.isTablesOnMaster(hbtu.getConfiguration()); if (tablesOnMaster) {
hbase git commit: HBASE-21097 Flush pressure assertion may fail in testFlushThroughputTuning
Repository: hbase Updated Branches: refs/heads/branch-2.1 198aa9066 -> 842e0c974 HBASE-21097 Flush pressure assertion may fail in testFlushThroughputTuning Amending-Author: Duo Zhang Signed-off-by: Duo Zhang Project: http://git-wip-us.apache.org/repos/asf/hbase/repo Commit: http://git-wip-us.apache.org/repos/asf/hbase/commit/842e0c97 Tree: http://git-wip-us.apache.org/repos/asf/hbase/tree/842e0c97 Diff: http://git-wip-us.apache.org/repos/asf/hbase/diff/842e0c97 Branch: refs/heads/branch-2.1 Commit: 842e0c974dc73736e778c2a83e8440b3d9c7d337 Parents: 198aa90 Author: Ted Yu Authored: Sat Sep 15 18:19:36 2018 +0800 Committer: zhangduo Committed: Sat Sep 15 18:39:42 2018 +0800 -- .../throttle/TestFlushWithThroughputController.java | 8 +++- 1 file changed, 7 insertions(+), 1 deletion(-) -- http://git-wip-us.apache.org/repos/asf/hbase/blob/842e0c97/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 1c39646..1f72b65 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 @@ -177,12 +177,18 @@ public class TestFlushWithThroughputController { .build()); hbtu.waitTableAvailable(tableName); HRegionServer regionServer = hbtu.getRSForFirstRegionInTable(tableName); +double pressure = regionServer.getFlushPressure(); +LOG.debug("Flush pressure before flushing: " + pressure); PressureAwareFlushThroughputController throughputController = (PressureAwareFlushThroughputController) regionServer.getFlushThroughputController(); for (HRegion region : regionServer.getRegions()) { region.flush(true); } -assertEquals(0.0, regionServer.getFlushPressure(), EPSILON); +// We used to assert that the flush pressure is zero but after HBASE-15787 or HBASE-18294 we +// changed to use heapSize instead of dataSize to calculate the flush pressure, and since +// heapSize will never be zero, so flush pressure will never be zero either. So we changed the +// assertion here. +assertTrue(regionServer.getFlushPressure() < pressure); Thread.sleep(5000); boolean tablesOnMaster = LoadBalancer.isTablesOnMaster(hbtu.getConfiguration()); if (tablesOnMaster) {
hbase git commit: HBASE-21097 Flush pressure assertion may fail in testFlushThroughputTuning
Repository: hbase Updated Branches: refs/heads/branch-2 fb54152e8 -> 966e3751c HBASE-21097 Flush pressure assertion may fail in testFlushThroughputTuning Amending-Author: Duo Zhang Signed-off-by: Duo Zhang Project: http://git-wip-us.apache.org/repos/asf/hbase/repo Commit: http://git-wip-us.apache.org/repos/asf/hbase/commit/966e3751 Tree: http://git-wip-us.apache.org/repos/asf/hbase/tree/966e3751 Diff: http://git-wip-us.apache.org/repos/asf/hbase/diff/966e3751 Branch: refs/heads/branch-2 Commit: 966e3751c28affa66361b5881917536b446643e3 Parents: fb54152 Author: Ted Yu Authored: Sat Sep 15 18:19:36 2018 +0800 Committer: zhangduo Committed: Sat Sep 15 18:36:33 2018 +0800 -- .../throttle/TestFlushWithThroughputController.java | 8 +++- 1 file changed, 7 insertions(+), 1 deletion(-) -- http://git-wip-us.apache.org/repos/asf/hbase/blob/966e3751/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 61f9cd4..7aaa153 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 @@ -177,12 +177,18 @@ public class TestFlushWithThroughputController { .build()); hbtu.waitTableAvailable(tableName); HRegionServer regionServer = hbtu.getRSForFirstRegionInTable(tableName); +double pressure = regionServer.getFlushPressure(); +LOG.debug("Flush pressure before flushing: " + pressure); PressureAwareFlushThroughputController throughputController = (PressureAwareFlushThroughputController) regionServer.getFlushThroughputController(); for (HRegion region : regionServer.getRegions()) { region.flush(true); } -assertEquals(0.0, regionServer.getFlushPressure(), EPSILON); +// We used to assert that the flush pressure is zero but after HBASE-15787 or HBASE-18294 we +// changed to use heapSize instead of dataSize to calculate the flush pressure, and since +// heapSize will never be zero, so flush pressure will never be zero either. So we changed the +// assertion here. +assertTrue(regionServer.getFlushPressure() < pressure); Thread.sleep(5000); boolean tablesOnMaster = LoadBalancer.isTablesOnMaster(hbtu.getConfiguration()); if (tablesOnMaster) {
hbase git commit: HBASE-21097 Flush pressure assertion may fail in testFlushThroughputTuning
Repository: hbase Updated Branches: refs/heads/master 38a697ad1 -> 9da20a411 HBASE-21097 Flush pressure assertion may fail in testFlushThroughputTuning Amending-Author: Duo Zhang Signed-off-by: Duo Zhang Project: http://git-wip-us.apache.org/repos/asf/hbase/repo Commit: http://git-wip-us.apache.org/repos/asf/hbase/commit/9da20a41 Tree: http://git-wip-us.apache.org/repos/asf/hbase/tree/9da20a41 Diff: http://git-wip-us.apache.org/repos/asf/hbase/diff/9da20a41 Branch: refs/heads/master Commit: 9da20a4116aea2a65b4579670718b0e94288e3ea Parents: 38a697a Author: Ted Yu Authored: Sat Sep 15 18:19:36 2018 +0800 Committer: zhangduo Committed: Sat Sep 15 18:20:35 2018 +0800 -- .../throttle/TestFlushWithThroughputController.java | 8 +++- 1 file changed, 7 insertions(+), 1 deletion(-) -- http://git-wip-us.apache.org/repos/asf/hbase/blob/9da20a41/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 61f9cd4..7aaa153 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 @@ -177,12 +177,18 @@ public class TestFlushWithThroughputController { .build()); hbtu.waitTableAvailable(tableName); HRegionServer regionServer = hbtu.getRSForFirstRegionInTable(tableName); +double pressure = regionServer.getFlushPressure(); +LOG.debug("Flush pressure before flushing: " + pressure); PressureAwareFlushThroughputController throughputController = (PressureAwareFlushThroughputController) regionServer.getFlushThroughputController(); for (HRegion region : regionServer.getRegions()) { region.flush(true); } -assertEquals(0.0, regionServer.getFlushPressure(), EPSILON); +// We used to assert that the flush pressure is zero but after HBASE-15787 or HBASE-18294 we +// changed to use heapSize instead of dataSize to calculate the flush pressure, and since +// heapSize will never be zero, so flush pressure will never be zero either. So we changed the +// assertion here. +assertTrue(regionServer.getFlushPressure() < pressure); Thread.sleep(5000); boolean tablesOnMaster = LoadBalancer.isTablesOnMaster(hbtu.getConfiguration()); if (tablesOnMaster) {
hbase git commit: HBASE-21097 Flush pressure assertion may fail in testFlushThroughputTuning
Repository: hbase Updated Branches: refs/heads/branch-2 a7a281a64 -> 87f9b4acc HBASE-21097 Flush pressure assertion may fail in testFlushThroughputTuning Project: http://git-wip-us.apache.org/repos/asf/hbase/repo Commit: http://git-wip-us.apache.org/repos/asf/hbase/commit/87f9b4ac Tree: http://git-wip-us.apache.org/repos/asf/hbase/tree/87f9b4ac Diff: http://git-wip-us.apache.org/repos/asf/hbase/diff/87f9b4ac Branch: refs/heads/branch-2 Commit: 87f9b4accda8633aafd60d421657a625a8a16a85 Parents: a7a281a Author: tedyu Authored: Thu Aug 23 11:49:47 2018 -0700 Committer: tedyu Committed: Thu Aug 23 11:49:47 2018 -0700 -- .../regionserver/throttle/TestFlushWithThroughputController.java | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) -- http://git-wip-us.apache.org/repos/asf/hbase/blob/87f9b4ac/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 1c39646..61f9cd4 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 @@ -66,7 +66,7 @@ public class TestFlushWithThroughputController { private static final Logger LOG = LoggerFactory.getLogger(TestFlushWithThroughputController.class); - private static final double EPSILON = 1E-6; + private static final double EPSILON = 1.3E-6; private HBaseTestingUtility hbtu; @Rule public TestName testName = new TestName();
hbase git commit: HBASE-21097 Flush pressure assertion may fail in testFlushThroughputTuning
Repository: hbase Updated Branches: refs/heads/master 72b36e1d9 -> 780670ede HBASE-21097 Flush pressure assertion may fail in testFlushThroughputTuning Project: http://git-wip-us.apache.org/repos/asf/hbase/repo Commit: http://git-wip-us.apache.org/repos/asf/hbase/commit/780670ed Tree: http://git-wip-us.apache.org/repos/asf/hbase/tree/780670ed Diff: http://git-wip-us.apache.org/repos/asf/hbase/diff/780670ed Branch: refs/heads/master Commit: 780670ede18ea2c4ff08ef703e2fde35536909e6 Parents: 72b36e1 Author: tedyu Authored: Thu Aug 23 11:48:27 2018 -0700 Committer: tedyu Committed: Thu Aug 23 11:48:27 2018 -0700 -- .../regionserver/throttle/TestFlushWithThroughputController.java | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) -- http://git-wip-us.apache.org/repos/asf/hbase/blob/780670ed/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 1c39646..61f9cd4 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 @@ -66,7 +66,7 @@ public class TestFlushWithThroughputController { private static final Logger LOG = LoggerFactory.getLogger(TestFlushWithThroughputController.class); - private static final double EPSILON = 1E-6; + private static final double EPSILON = 1.3E-6; private HBaseTestingUtility hbtu; @Rule public TestName testName = new TestName();