Skip to content

Commit

Permalink
HBASE-24755 [LOG][RSGroup]Error message is confusing while adding a o…
Browse files Browse the repository at this point in the history
…ffline RS to rsgroup (#2846)

Signed-off-by: Viraj Jasani <[email protected]>
Signed-off-by: Wellington Chevreuil <[email protected]>
  • Loading branch information
mokai87 authored Jan 6, 2021
1 parent bedb45d commit a414361
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 5 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -1233,9 +1233,9 @@ public void moveServers(Set<Address> servers, String targetGroupName) throws IOE
Address firstServer = servers.iterator().next();
RSGroupInfo srcGrp = getRSGroupOfServer(firstServer);
if (srcGrp == null) {
// Be careful. This exception message is tested for in TestRSGroupsBase...
throw new ConstraintException("Source RSGroup for server " + firstServer
+ " does not exist.");
// Be careful. This exception message is tested for in TestRSGroupAdmin2...
throw new ConstraintException("Server " + firstServer
+ " is either offline or it does not exist.");
}

// Only move online servers (when moving from 'default') or servers from other
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -189,7 +189,7 @@ public void testMoveServers() throws Exception {
ADMIN.moveServersToRSGroup(Sets.newHashSet(Address.fromString("foo:9999")), "foo");
fail("Bogus servers shouldn't have been successfully moved.");
} catch (IOException ex) {
String exp = "Source RSGroup for server foo:9999 does not exist.";
String exp = "Server foo:9999 is either offline or it does not exist.";
String msg = "Expected '" + exp + "' in exception message: ";
assertTrue(msg + " " + ex.getMessage(), ex.getMessage().contains(exp));
}
Expand Down Expand Up @@ -337,7 +337,7 @@ public boolean evaluate() throws Exception {
ADMIN.setRSGroup(Sets.newHashSet(tableName), newGroup.getName());
fail("Bogus servers shouldn't have been successfully moved.");
} catch (IOException ex) {
String exp = "Source RSGroup for server foo:9999 does not exist.";
String exp = "Server foo:9999 is either offline or it does not exist.";
String msg = "Expected '" + exp + "' in exception message: ";
assertTrue(msg + " " + ex.getMessage(), ex.getMessage().contains(exp));
}
Expand Down

0 comments on commit a414361

Please sign in to comment.