sanjeetnishad95 commented on a change in pull request #2780:
URL: https://github.com/apache/hbase/pull/2780#discussion_r572895744
##########
File path:
hbase-server/src/test/java/org/apache/hadoop/hbase/rsgroup/TestRSGroupsAdmin1.java
##########
@@ -621,4 +622,38 @@ public void testTableConstraint() throws Exception {
TEST_UTIL.deleteTable(tableName);
ADMIN.deleteNamespace(ns);
}
+
+ @Test
+ public void testHBASE25301() throws IOException, InterruptedException {
+ String pgroup = "pgroup";
+ ADMIN.addRSGroup(pgroup);
+
+ ServerName serverName0 =
TEST_UTIL.getMiniHBaseCluster().getRegionServer(0).getServerName();
+ ServerName serverName1 =
TEST_UTIL.getMiniHBaseCluster().getRegionServer(1).getServerName();
+ ADMIN.moveServersToRSGroup(Sets.newHashSet(serverName0.getAddress(),
serverName1.getAddress()),
+ pgroup);
+
+ TableName table1 = TableName.valueOf("table1");
+ TableName table2 = TableName.valueOf("table2");
+ TEST_UTIL.createTable(table1, "cf");
+ TEST_UTIL.createTable(table2, "cf");
+
+ ADMIN.setRSGroup(Sets.newHashSet(table1, table2), pgroup);
+
+ List<RegionInfo> regionInfoList = ADMIN.getRegions(table1);
+ regionInfoList.addAll(ADMIN.getRegions(table2));
+ for (RegionInfo regionInfo : regionInfoList) {
+ ADMIN.move(regionInfo.getEncodedNameAsBytes(), serverName0);
+ }
+
+ ADMIN.split(table2, "50".getBytes());
+ // Waiting briefly so that daughter regions are created but parent is not
cleaned yet.
+ Thread.sleep(2000);
Review comment:
Added a wait logic to wait enough for parent region to have state as
`SPLIT`
----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
For queries about this service, please contact Infrastructure at:
[email protected]