HBASE-24096 Fix TestRSGroupsBalance (#1402)

Signed-off-by: Reid Chan <reidchan@apache.org>
Signed-off-by: stack <stack@apache.org>
This commit is contained in:
binlijin 2020-04-01 14:16:57 +08:00 committed by GitHub
parent 6f213e9d5a
commit 52c101389e
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
2 changed files with 5 additions and 2 deletions

View File

@ -223,7 +223,7 @@ final class RSGroupInfoManagerImpl implements RSGroupInfoManager {
String getRSGroup(String namespace, String tablename) {
if (rsgroupMappingScript == null) {
return RSGroupInfo.DEFAULT_GROUP;
return null;
}
String[] exec = rsgroupMappingScript.getExecString();
exec[1] = namespace;

View File

@ -87,7 +87,10 @@ public final class RSGroupUtil {
}
// RSGroup information determined by administrator.
String groupDeterminedByAdmin = manager.determineRSGroupInfoForTable(tableName);
RSGroupInfo groupInfo = manager.getRSGroup(groupDeterminedByAdmin);
RSGroupInfo groupInfo = null;
if (groupDeterminedByAdmin != null) {
groupInfo = manager.getRSGroup(groupDeterminedByAdmin);
}
if (groupInfo != null) {
return Optional.of(groupInfo);
}