hbase-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From els...@apache.org
Subject [16/54] [abbrv] hbase git commit: HBASE-17806 TestRSGroups#testMoveServersAndTables is flaky in master branch (Guangxu Cheng)
Date Mon, 20 Mar 2017 22:49:49 GMT
HBASE-17806 TestRSGroups#testMoveServersAndTables is flaky in master branch (Guangxu Cheng)


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

Branch: refs/heads/HBASE-16961
Commit: 4088f822a449acc39c2408a287f820ec26acabf4
Parents: 5b4bb82
Author: tedyu <yuzhihong@gmail.com>
Authored: Mon Mar 20 09:26:34 2017 -0700
Committer: tedyu <yuzhihong@gmail.com>
Committed: Mon Mar 20 09:26:34 2017 -0700

----------------------------------------------------------------------
 .../org/apache/hadoop/hbase/rsgroup/RSGroupInfo.java     |  3 +++
 .../apache/hadoop/hbase/rsgroup/TestRSGroupsBase.java    | 11 +++++++++--
 2 files changed, 12 insertions(+), 2 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/hbase/blob/4088f822/hbase-common/src/main/java/org/apache/hadoop/hbase/rsgroup/RSGroupInfo.java
----------------------------------------------------------------------
diff --git a/hbase-common/src/main/java/org/apache/hadoop/hbase/rsgroup/RSGroupInfo.java b/hbase-common/src/main/java/org/apache/hadoop/hbase/rsgroup/RSGroupInfo.java
index 35563c5..9219c23 100644
--- a/hbase-common/src/main/java/org/apache/hadoop/hbase/rsgroup/RSGroupInfo.java
+++ b/hbase-common/src/main/java/org/apache/hadoop/hbase/rsgroup/RSGroupInfo.java
@@ -132,6 +132,9 @@ public class RSGroupInfo {
     sb.append(", ");
     sb.append(" Servers:");
     sb.append(this.servers);
+    sb.append(", ");
+    sb.append(" Tables:");
+    sb.append(this.tables);
     return sb.toString();
 
   }

http://git-wip-us.apache.org/repos/asf/hbase/blob/4088f822/hbase-rsgroup/src/test/java/org/apache/hadoop/hbase/rsgroup/TestRSGroupsBase.java
----------------------------------------------------------------------
diff --git a/hbase-rsgroup/src/test/java/org/apache/hadoop/hbase/rsgroup/TestRSGroupsBase.java
b/hbase-rsgroup/src/test/java/org/apache/hadoop/hbase/rsgroup/TestRSGroupsBase.java
index e8cdb78..e5c89c3 100644
--- a/hbase-rsgroup/src/test/java/org/apache/hadoop/hbase/rsgroup/TestRSGroupsBase.java
+++ b/hbase-rsgroup/src/test/java/org/apache/hadoop/hbase/rsgroup/TestRSGroupsBase.java
@@ -694,6 +694,7 @@ public abstract class TestRSGroupsBase {
 
   @Test
   public void testMoveServersAndTables() throws Exception {
+    LOG.info("testMoveServersAndTables");
     final RSGroupInfo newGroup = addGroup(getGroupName(name.getMethodName()), 1);
     //create table
     final byte[] familyNameBytes = Bytes.toBytes("f");
@@ -718,6 +719,12 @@ public abstract class TestRSGroupsBase {
       }
     }
 
+    LOG.debug("Print group info : " + rsGroupAdmin.listRSGroups());
+    int oldDefaultGroupServerSize =
+            rsGroupAdmin.getRSGroupInfo(RSGroupInfo.DEFAULT_GROUP).getServers().size();
+    int oldDefaultGroupTableSize =
+            rsGroupAdmin.getRSGroupInfo(RSGroupInfo.DEFAULT_GROUP).getTables().size();
+
     //test fail bogus server move
     try {
       rsGroupAdmin.moveServersAndTables(Sets.newHashSet(Address.fromString("foo:9999")),
@@ -742,9 +749,9 @@ public abstract class TestRSGroupsBase {
     }
 
     //verify default group info
-    Assert.assertEquals(3,
+    Assert.assertEquals(oldDefaultGroupServerSize,
             rsGroupAdmin.getRSGroupInfo(RSGroupInfo.DEFAULT_GROUP).getServers().size());
-    Assert.assertEquals(4,
+    Assert.assertEquals(oldDefaultGroupTableSize,
             rsGroupAdmin.getRSGroupInfo(RSGroupInfo.DEFAULT_GROUP).getTables().size());
 
     //verify new group info


Mime
View raw message