[02/18] hbase git commit: HBASE-19837 Flakey TestRegionLoad; ADDENDUM Report more often and wait less time on change (also add some debug on TestMetaShutdown test)
HBASE-19837 Flakey TestRegionLoad; ADDENDUM Report more often and wait less time on change (also add some debug on TestMetaShutdown test) Project: http://git-wip-us.apache.org/repos/asf/hbase/repo Commit: http://git-wip-us.apache.org/repos/asf/hbase/commit/c245bd5c Tree: http://git-wip-us.apache.org/repos/asf/hbase/tree/c245bd5c Diff: http://git-wip-us.apache.org/repos/asf/hbase/diff/c245bd5c Branch: refs/heads/HBASE-19064 Commit: c245bd5c036dbe84deada8ff94f12a984576ffe4 Parents: c5f86f2 Author: Michael StackAuthored: Mon Feb 5 08:39:46 2018 -0800 Committer: Michael Stack Committed: Mon Feb 5 08:40:26 2018 -0800 -- .../org/apache/hadoop/hbase/TestRegionLoad.java | 10 +--- .../hbase/master/TestMetaShutdownHandler.java | 27 ++-- 2 files changed, 21 insertions(+), 16 deletions(-) -- http://git-wip-us.apache.org/repos/asf/hbase/blob/c245bd5c/hbase-server/src/test/java/org/apache/hadoop/hbase/TestRegionLoad.java -- diff --git a/hbase-server/src/test/java/org/apache/hadoop/hbase/TestRegionLoad.java b/hbase-server/src/test/java/org/apache/hadoop/hbase/TestRegionLoad.java index 801d2d8..d0484d6 100644 --- a/hbase-server/src/test/java/org/apache/hadoop/hbase/TestRegionLoad.java +++ b/hbase-server/src/test/java/org/apache/hadoop/hbase/TestRegionLoad.java @@ -1,4 +1,4 @@ -/** +/* * Licensed to the Apache Software Foundation (ASF) under one * or more contributor license agreements. See the NOTICE file * distributed with this work for additional information @@ -64,6 +64,9 @@ public class TestRegionLoad { @BeforeClass public static void beforeClass() throws Exception { +// Make servers report eagerly. This test is about looking at the cluster status reported. +// Make it so we don't have to wait around too long to see change. +UTIL.getConfiguration().setInt("hbase.regionserver.msginterval", 500); UTIL.startMiniCluster(4); admin = UTIL.getAdmin(); admin.setBalancerRunning(false, true); @@ -114,10 +117,11 @@ public class TestRegionLoad { } checkRegionsAndRegionLoads(tableRegions, regionLoads); } +int pause = UTIL.getConfiguration().getInt("hbase.regionserver.msginterval", 3000); // Just wait here. If this fixes the test, come back and do a better job. -// Thought is that cluster status is stale. -Threads.sleep(1); +// Would have to redo the below so can wait on cluster status changing. +Threads.sleep(2 * pause); // Check RegionLoad matches the regionLoad from ClusterStatus ClusterStatus clusterStatus http://git-wip-us.apache.org/repos/asf/hbase/blob/c245bd5c/hbase-server/src/test/java/org/apache/hadoop/hbase/master/TestMetaShutdownHandler.java -- diff --git a/hbase-server/src/test/java/org/apache/hadoop/hbase/master/TestMetaShutdownHandler.java b/hbase-server/src/test/java/org/apache/hadoop/hbase/master/TestMetaShutdownHandler.java index d063f0a..7e730ae 100644 --- a/hbase-server/src/test/java/org/apache/hadoop/hbase/master/TestMetaShutdownHandler.java +++ b/hbase-server/src/test/java/org/apache/hadoop/hbase/master/TestMetaShutdownHandler.java @@ -1,4 +1,4 @@ -/** +/* * Licensed to the Apache Software Foundation (ASF) under one * or more contributor license agreements. See the NOTICE file * distributed with this work for additional information @@ -23,7 +23,6 @@ import static org.junit.Assert.assertTrue; import java.io.IOException; import org.apache.hadoop.conf.Configuration; -import org.apache.hadoop.hbase.CoordinatedStateManager; import org.apache.hadoop.hbase.HBaseClassTestRule; import org.apache.hadoop.hbase.HBaseTestingUtility; import org.apache.hadoop.hbase.HRegionInfo; @@ -43,13 +42,15 @@ import org.junit.BeforeClass; import org.junit.ClassRule; import org.junit.Test; import org.junit.experimental.categories.Category; +import org.slf4j.Logger; +import org.slf4j.LoggerFactory; /** * Tests handling of meta-carrying region server failover. */ @Category(MediumTests.class) public class TestMetaShutdownHandler { - + private static final Logger LOG = LoggerFactory.getLogger(TestMetaShutdownHandler.class); @ClassRule public static final HBaseClassTestRule CLASS_RULE = HBaseClassTestRule.forClass(TestMetaShutdownHandler.class); @@ -80,7 +81,6 @@ public class TestMetaShutdownHandler { @Test (timeout=18) public void testExpireMetaRegionServer() throws Exception { MiniHBaseCluster cluster = TEST_UTIL.getHBaseCluster(); - HMaster master = cluster.getMaster(); RegionStates regionStates = master.getAssignmentManager().getRegionStates(); ServerName metaServerName = regionStates.getRegionServerOfRegion( @@ -88,23
[03/50] hbase git commit: HBASE-19837 Flakey TestRegionLoad; ADDENDUM Report more often and wait less time on change (also add some debug on TestMetaShutdown test)
HBASE-19837 Flakey TestRegionLoad; ADDENDUM Report more often and wait less time on change (also add some debug on TestMetaShutdown test) Project: http://git-wip-us.apache.org/repos/asf/hbase/repo Commit: http://git-wip-us.apache.org/repos/asf/hbase/commit/29016bc1 Tree: http://git-wip-us.apache.org/repos/asf/hbase/tree/29016bc1 Diff: http://git-wip-us.apache.org/repos/asf/hbase/diff/29016bc1 Branch: refs/heads/HBASE-19397-branch-2 Commit: 29016bc100ff3f7f266222bbdda2f66b474f3f7f Parents: f0a5f12 Author: Michael StackAuthored: Mon Feb 5 08:39:46 2018 -0800 Committer: Michael Stack Committed: Mon Feb 5 08:39:52 2018 -0800 -- .../org/apache/hadoop/hbase/TestRegionLoad.java | 10 +--- .../hbase/master/TestMetaShutdownHandler.java | 27 ++-- 2 files changed, 21 insertions(+), 16 deletions(-) -- http://git-wip-us.apache.org/repos/asf/hbase/blob/29016bc1/hbase-server/src/test/java/org/apache/hadoop/hbase/TestRegionLoad.java -- diff --git a/hbase-server/src/test/java/org/apache/hadoop/hbase/TestRegionLoad.java b/hbase-server/src/test/java/org/apache/hadoop/hbase/TestRegionLoad.java index 801d2d8..d0484d6 100644 --- a/hbase-server/src/test/java/org/apache/hadoop/hbase/TestRegionLoad.java +++ b/hbase-server/src/test/java/org/apache/hadoop/hbase/TestRegionLoad.java @@ -1,4 +1,4 @@ -/** +/* * Licensed to the Apache Software Foundation (ASF) under one * or more contributor license agreements. See the NOTICE file * distributed with this work for additional information @@ -64,6 +64,9 @@ public class TestRegionLoad { @BeforeClass public static void beforeClass() throws Exception { +// Make servers report eagerly. This test is about looking at the cluster status reported. +// Make it so we don't have to wait around too long to see change. +UTIL.getConfiguration().setInt("hbase.regionserver.msginterval", 500); UTIL.startMiniCluster(4); admin = UTIL.getAdmin(); admin.setBalancerRunning(false, true); @@ -114,10 +117,11 @@ public class TestRegionLoad { } checkRegionsAndRegionLoads(tableRegions, regionLoads); } +int pause = UTIL.getConfiguration().getInt("hbase.regionserver.msginterval", 3000); // Just wait here. If this fixes the test, come back and do a better job. -// Thought is that cluster status is stale. -Threads.sleep(1); +// Would have to redo the below so can wait on cluster status changing. +Threads.sleep(2 * pause); // Check RegionLoad matches the regionLoad from ClusterStatus ClusterStatus clusterStatus http://git-wip-us.apache.org/repos/asf/hbase/blob/29016bc1/hbase-server/src/test/java/org/apache/hadoop/hbase/master/TestMetaShutdownHandler.java -- diff --git a/hbase-server/src/test/java/org/apache/hadoop/hbase/master/TestMetaShutdownHandler.java b/hbase-server/src/test/java/org/apache/hadoop/hbase/master/TestMetaShutdownHandler.java index d063f0a..7e730ae 100644 --- a/hbase-server/src/test/java/org/apache/hadoop/hbase/master/TestMetaShutdownHandler.java +++ b/hbase-server/src/test/java/org/apache/hadoop/hbase/master/TestMetaShutdownHandler.java @@ -1,4 +1,4 @@ -/** +/* * Licensed to the Apache Software Foundation (ASF) under one * or more contributor license agreements. See the NOTICE file * distributed with this work for additional information @@ -23,7 +23,6 @@ import static org.junit.Assert.assertTrue; import java.io.IOException; import org.apache.hadoop.conf.Configuration; -import org.apache.hadoop.hbase.CoordinatedStateManager; import org.apache.hadoop.hbase.HBaseClassTestRule; import org.apache.hadoop.hbase.HBaseTestingUtility; import org.apache.hadoop.hbase.HRegionInfo; @@ -43,13 +42,15 @@ import org.junit.BeforeClass; import org.junit.ClassRule; import org.junit.Test; import org.junit.experimental.categories.Category; +import org.slf4j.Logger; +import org.slf4j.LoggerFactory; /** * Tests handling of meta-carrying region server failover. */ @Category(MediumTests.class) public class TestMetaShutdownHandler { - + private static final Logger LOG = LoggerFactory.getLogger(TestMetaShutdownHandler.class); @ClassRule public static final HBaseClassTestRule CLASS_RULE = HBaseClassTestRule.forClass(TestMetaShutdownHandler.class); @@ -80,7 +81,6 @@ public class TestMetaShutdownHandler { @Test (timeout=18) public void testExpireMetaRegionServer() throws Exception { MiniHBaseCluster cluster = TEST_UTIL.getHBaseCluster(); - HMaster master = cluster.getMaster(); RegionStates regionStates = master.getAssignmentManager().getRegionStates(); ServerName metaServerName = regionStates.getRegionServerOfRegion(
hbase git commit: HBASE-19837 Flakey TestRegionLoad; ADDENDUM Report more often and wait less time on change (also add some debug on TestMetaShutdown test)
Repository: hbase Updated Branches: refs/heads/master c5f86f2ce -> c245bd5c0 HBASE-19837 Flakey TestRegionLoad; ADDENDUM Report more often and wait less time on change (also add some debug on TestMetaShutdown test) Project: http://git-wip-us.apache.org/repos/asf/hbase/repo Commit: http://git-wip-us.apache.org/repos/asf/hbase/commit/c245bd5c Tree: http://git-wip-us.apache.org/repos/asf/hbase/tree/c245bd5c Diff: http://git-wip-us.apache.org/repos/asf/hbase/diff/c245bd5c Branch: refs/heads/master Commit: c245bd5c036dbe84deada8ff94f12a984576ffe4 Parents: c5f86f2 Author: Michael StackAuthored: Mon Feb 5 08:39:46 2018 -0800 Committer: Michael Stack Committed: Mon Feb 5 08:40:26 2018 -0800 -- .../org/apache/hadoop/hbase/TestRegionLoad.java | 10 +--- .../hbase/master/TestMetaShutdownHandler.java | 27 ++-- 2 files changed, 21 insertions(+), 16 deletions(-) -- http://git-wip-us.apache.org/repos/asf/hbase/blob/c245bd5c/hbase-server/src/test/java/org/apache/hadoop/hbase/TestRegionLoad.java -- diff --git a/hbase-server/src/test/java/org/apache/hadoop/hbase/TestRegionLoad.java b/hbase-server/src/test/java/org/apache/hadoop/hbase/TestRegionLoad.java index 801d2d8..d0484d6 100644 --- a/hbase-server/src/test/java/org/apache/hadoop/hbase/TestRegionLoad.java +++ b/hbase-server/src/test/java/org/apache/hadoop/hbase/TestRegionLoad.java @@ -1,4 +1,4 @@ -/** +/* * Licensed to the Apache Software Foundation (ASF) under one * or more contributor license agreements. See the NOTICE file * distributed with this work for additional information @@ -64,6 +64,9 @@ public class TestRegionLoad { @BeforeClass public static void beforeClass() throws Exception { +// Make servers report eagerly. This test is about looking at the cluster status reported. +// Make it so we don't have to wait around too long to see change. +UTIL.getConfiguration().setInt("hbase.regionserver.msginterval", 500); UTIL.startMiniCluster(4); admin = UTIL.getAdmin(); admin.setBalancerRunning(false, true); @@ -114,10 +117,11 @@ public class TestRegionLoad { } checkRegionsAndRegionLoads(tableRegions, regionLoads); } +int pause = UTIL.getConfiguration().getInt("hbase.regionserver.msginterval", 3000); // Just wait here. If this fixes the test, come back and do a better job. -// Thought is that cluster status is stale. -Threads.sleep(1); +// Would have to redo the below so can wait on cluster status changing. +Threads.sleep(2 * pause); // Check RegionLoad matches the regionLoad from ClusterStatus ClusterStatus clusterStatus http://git-wip-us.apache.org/repos/asf/hbase/blob/c245bd5c/hbase-server/src/test/java/org/apache/hadoop/hbase/master/TestMetaShutdownHandler.java -- diff --git a/hbase-server/src/test/java/org/apache/hadoop/hbase/master/TestMetaShutdownHandler.java b/hbase-server/src/test/java/org/apache/hadoop/hbase/master/TestMetaShutdownHandler.java index d063f0a..7e730ae 100644 --- a/hbase-server/src/test/java/org/apache/hadoop/hbase/master/TestMetaShutdownHandler.java +++ b/hbase-server/src/test/java/org/apache/hadoop/hbase/master/TestMetaShutdownHandler.java @@ -1,4 +1,4 @@ -/** +/* * Licensed to the Apache Software Foundation (ASF) under one * or more contributor license agreements. See the NOTICE file * distributed with this work for additional information @@ -23,7 +23,6 @@ import static org.junit.Assert.assertTrue; import java.io.IOException; import org.apache.hadoop.conf.Configuration; -import org.apache.hadoop.hbase.CoordinatedStateManager; import org.apache.hadoop.hbase.HBaseClassTestRule; import org.apache.hadoop.hbase.HBaseTestingUtility; import org.apache.hadoop.hbase.HRegionInfo; @@ -43,13 +42,15 @@ import org.junit.BeforeClass; import org.junit.ClassRule; import org.junit.Test; import org.junit.experimental.categories.Category; +import org.slf4j.Logger; +import org.slf4j.LoggerFactory; /** * Tests handling of meta-carrying region server failover. */ @Category(MediumTests.class) public class TestMetaShutdownHandler { - + private static final Logger LOG = LoggerFactory.getLogger(TestMetaShutdownHandler.class); @ClassRule public static final HBaseClassTestRule CLASS_RULE = HBaseClassTestRule.forClass(TestMetaShutdownHandler.class); @@ -80,7 +81,6 @@ public class TestMetaShutdownHandler { @Test (timeout=18) public void testExpireMetaRegionServer() throws Exception { MiniHBaseCluster cluster = TEST_UTIL.getHBaseCluster(); - HMaster master = cluster.getMaster(); RegionStates regionStates = master.getAssignmentManager().getRegionStates();
hbase git commit: HBASE-19837 Flakey TestRegionLoad; ADDENDUM Report more often and wait less time on change (also add some debug on TestMetaShutdown test)
Repository: hbase Updated Branches: refs/heads/branch-2 f0a5f12d9 -> 29016bc10 HBASE-19837 Flakey TestRegionLoad; ADDENDUM Report more often and wait less time on change (also add some debug on TestMetaShutdown test) Project: http://git-wip-us.apache.org/repos/asf/hbase/repo Commit: http://git-wip-us.apache.org/repos/asf/hbase/commit/29016bc1 Tree: http://git-wip-us.apache.org/repos/asf/hbase/tree/29016bc1 Diff: http://git-wip-us.apache.org/repos/asf/hbase/diff/29016bc1 Branch: refs/heads/branch-2 Commit: 29016bc100ff3f7f266222bbdda2f66b474f3f7f Parents: f0a5f12 Author: Michael StackAuthored: Mon Feb 5 08:39:46 2018 -0800 Committer: Michael Stack Committed: Mon Feb 5 08:39:52 2018 -0800 -- .../org/apache/hadoop/hbase/TestRegionLoad.java | 10 +--- .../hbase/master/TestMetaShutdownHandler.java | 27 ++-- 2 files changed, 21 insertions(+), 16 deletions(-) -- http://git-wip-us.apache.org/repos/asf/hbase/blob/29016bc1/hbase-server/src/test/java/org/apache/hadoop/hbase/TestRegionLoad.java -- diff --git a/hbase-server/src/test/java/org/apache/hadoop/hbase/TestRegionLoad.java b/hbase-server/src/test/java/org/apache/hadoop/hbase/TestRegionLoad.java index 801d2d8..d0484d6 100644 --- a/hbase-server/src/test/java/org/apache/hadoop/hbase/TestRegionLoad.java +++ b/hbase-server/src/test/java/org/apache/hadoop/hbase/TestRegionLoad.java @@ -1,4 +1,4 @@ -/** +/* * Licensed to the Apache Software Foundation (ASF) under one * or more contributor license agreements. See the NOTICE file * distributed with this work for additional information @@ -64,6 +64,9 @@ public class TestRegionLoad { @BeforeClass public static void beforeClass() throws Exception { +// Make servers report eagerly. This test is about looking at the cluster status reported. +// Make it so we don't have to wait around too long to see change. +UTIL.getConfiguration().setInt("hbase.regionserver.msginterval", 500); UTIL.startMiniCluster(4); admin = UTIL.getAdmin(); admin.setBalancerRunning(false, true); @@ -114,10 +117,11 @@ public class TestRegionLoad { } checkRegionsAndRegionLoads(tableRegions, regionLoads); } +int pause = UTIL.getConfiguration().getInt("hbase.regionserver.msginterval", 3000); // Just wait here. If this fixes the test, come back and do a better job. -// Thought is that cluster status is stale. -Threads.sleep(1); +// Would have to redo the below so can wait on cluster status changing. +Threads.sleep(2 * pause); // Check RegionLoad matches the regionLoad from ClusterStatus ClusterStatus clusterStatus http://git-wip-us.apache.org/repos/asf/hbase/blob/29016bc1/hbase-server/src/test/java/org/apache/hadoop/hbase/master/TestMetaShutdownHandler.java -- diff --git a/hbase-server/src/test/java/org/apache/hadoop/hbase/master/TestMetaShutdownHandler.java b/hbase-server/src/test/java/org/apache/hadoop/hbase/master/TestMetaShutdownHandler.java index d063f0a..7e730ae 100644 --- a/hbase-server/src/test/java/org/apache/hadoop/hbase/master/TestMetaShutdownHandler.java +++ b/hbase-server/src/test/java/org/apache/hadoop/hbase/master/TestMetaShutdownHandler.java @@ -1,4 +1,4 @@ -/** +/* * Licensed to the Apache Software Foundation (ASF) under one * or more contributor license agreements. See the NOTICE file * distributed with this work for additional information @@ -23,7 +23,6 @@ import static org.junit.Assert.assertTrue; import java.io.IOException; import org.apache.hadoop.conf.Configuration; -import org.apache.hadoop.hbase.CoordinatedStateManager; import org.apache.hadoop.hbase.HBaseClassTestRule; import org.apache.hadoop.hbase.HBaseTestingUtility; import org.apache.hadoop.hbase.HRegionInfo; @@ -43,13 +42,15 @@ import org.junit.BeforeClass; import org.junit.ClassRule; import org.junit.Test; import org.junit.experimental.categories.Category; +import org.slf4j.Logger; +import org.slf4j.LoggerFactory; /** * Tests handling of meta-carrying region server failover. */ @Category(MediumTests.class) public class TestMetaShutdownHandler { - + private static final Logger LOG = LoggerFactory.getLogger(TestMetaShutdownHandler.class); @ClassRule public static final HBaseClassTestRule CLASS_RULE = HBaseClassTestRule.forClass(TestMetaShutdownHandler.class); @@ -80,7 +81,6 @@ public class TestMetaShutdownHandler { @Test (timeout=18) public void testExpireMetaRegionServer() throws Exception { MiniHBaseCluster cluster = TEST_UTIL.getHBaseCluster(); - HMaster master = cluster.getMaster(); RegionStates regionStates = master.getAssignmentManager().getRegionStates();