Skip to content

Commit

Permalink
Address review comments
Browse files Browse the repository at this point in the history
  • Loading branch information
Reidddddd committed Apr 6, 2020
1 parent 9c473f0 commit 6105914
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 2 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -1233,7 +1233,7 @@ public synchronized void renameRSGroup(String oldName, String newName) throws IO
Map<String, RSGroupInfo> newGroupMap = Maps.newHashMap(rsGroupMap);
newGroupMap.remove(oldRSG.getName());
RSGroupInfo newRSG = new RSGroupInfo(newName, oldRSG.getServers());
newGroupMap.put(newRSG.getName(), newRSG);
newGroupMap.put(newName, newRSG);
flushConfig(newGroupMap);

TableDescriptors tableDescriptors = masterServices.getTableDescriptors();
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -476,7 +476,9 @@ public void testRenameRSGroup() throws Exception {
TableName tb = TableName.valueOf("testRename");
TEST_UTIL.createTable(tb, "tr");
ADMIN.setRSGroup(Sets.newHashSet(tb), oldgroup.getName());
Thread.sleep(500);
TEST_UTIL.waitFor(1000,
(Waiter.Predicate<Exception>) () ->
ADMIN.getRSGroup("oldgroup").getServers().size() == 2);
oldgroup = ADMIN.getRSGroup(oldgroup.getName());
assertEquals(2, oldgroup.getServers().size());
assertEquals(oldgroup.getName(), ADMIN.getRSGroup(tb).getName());
Expand Down

0 comments on commit 6105914

Please sign in to comment.