Skip to content

Commit a414361

Browse files
authored
HBASE-24755 [LOG][RSGroup]Error message is confusing while adding a offline RS to rsgroup (#2846)
Signed-off-by: Viraj Jasani <[email protected]> Signed-off-by: Wellington Chevreuil <[email protected]>
1 parent bedb45d commit a414361

File tree

2 files changed

+5
-5
lines changed

2 files changed

+5
-5
lines changed

hbase-server/src/main/java/org/apache/hadoop/hbase/rsgroup/RSGroupInfoManagerImpl.java

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1233,9 +1233,9 @@ public void moveServers(Set<Address> servers, String targetGroupName) throws IOE
12331233
Address firstServer = servers.iterator().next();
12341234
RSGroupInfo srcGrp = getRSGroupOfServer(firstServer);
12351235
if (srcGrp == null) {
1236-
// Be careful. This exception message is tested for in TestRSGroupsBase...
1237-
throw new ConstraintException("Source RSGroup for server " + firstServer
1238-
+ " does not exist.");
1236+
// Be careful. This exception message is tested for in TestRSGroupAdmin2...
1237+
throw new ConstraintException("Server " + firstServer
1238+
+ " is either offline or it does not exist.");
12391239
}
12401240

12411241
// Only move online servers (when moving from 'default') or servers from other

hbase-server/src/test/java/org/apache/hadoop/hbase/rsgroup/TestRSGroupsAdmin2.java

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -189,7 +189,7 @@ public void testMoveServers() throws Exception {
189189
ADMIN.moveServersToRSGroup(Sets.newHashSet(Address.fromString("foo:9999")), "foo");
190190
fail("Bogus servers shouldn't have been successfully moved.");
191191
} catch (IOException ex) {
192-
String exp = "Source RSGroup for server foo:9999 does not exist.";
192+
String exp = "Server foo:9999 is either offline or it does not exist.";
193193
String msg = "Expected '" + exp + "' in exception message: ";
194194
assertTrue(msg + " " + ex.getMessage(), ex.getMessage().contains(exp));
195195
}
@@ -337,7 +337,7 @@ public boolean evaluate() throws Exception {
337337
ADMIN.setRSGroup(Sets.newHashSet(tableName), newGroup.getName());
338338
fail("Bogus servers shouldn't have been successfully moved.");
339339
} catch (IOException ex) {
340-
String exp = "Source RSGroup for server foo:9999 does not exist.";
340+
String exp = "Server foo:9999 is either offline or it does not exist.";
341341
String msg = "Expected '" + exp + "' in exception message: ";
342342
assertTrue(msg + " " + ex.getMessage(), ex.getMessage().contains(exp));
343343
}

0 commit comments

Comments
 (0)