You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@hbase.apache.org by vj...@apache.org on 2020/07/17 17:17:29 UTC
[hbase] branch branch-2 updated: HBASE-24675: On Master restart all
servers are assigned to default rsgroup
This is an automated email from the ASF dual-hosted git repository.
vjasani pushed a commit to branch branch-2
in repository https://gitbox.apache.org/repos/asf/hbase.git
The following commit(s) were added to refs/heads/branch-2 by this push:
new e08da3b HBASE-24675: On Master restart all servers are assigned to default rsgroup
e08da3b is described below
commit e08da3bf2690a24d851449cb0e9f3c7de9124d51
Author: Mohammad Arshad <ar...@apache.org>
AuthorDate: Fri Jul 17 22:43:44 2020 +0530
HBASE-24675: On Master restart all servers are assigned to default rsgroup
Closes #2053
Signed-off-by: Viraj Jasani <vj...@apache.org>
---
.../apache/hadoop/hbase/rsgroup/RSGroupInfoManagerImpl.java | 11 +++++++++--
1 file changed, 9 insertions(+), 2 deletions(-)
diff --git a/hbase-rsgroup/src/main/java/org/apache/hadoop/hbase/rsgroup/RSGroupInfoManagerImpl.java b/hbase-rsgroup/src/main/java/org/apache/hadoop/hbase/rsgroup/RSGroupInfoManagerImpl.java
index da26ec4..2b727ed 100644
--- a/hbase-rsgroup/src/main/java/org/apache/hadoop/hbase/rsgroup/RSGroupInfoManagerImpl.java
+++ b/hbase-rsgroup/src/main/java/org/apache/hadoop/hbase/rsgroup/RSGroupInfoManagerImpl.java
@@ -546,7 +546,8 @@ final class RSGroupInfoManagerImpl implements RSGroupInfoManager {
// This is added to the last of the list so it overwrites the 'default' rsgroup loaded
// from region group table or zk
- groupList.add(new RSGroupInfo(RSGroupInfo.DEFAULT_GROUP, getDefaultServers(), orphanTables));
+ groupList.add(
+ new RSGroupInfo(RSGroupInfo.DEFAULT_GROUP, getDefaultServers(groupList), orphanTables));
// populate the data
HashMap<String, RSGroupInfo> newGroupMap = Maps.newHashMap();
@@ -705,9 +706,15 @@ final class RSGroupInfoManagerImpl implements RSGroupInfoManager {
// Called by ServerEventsListenerThread. Presume it has lock on this manager when it runs.
private SortedSet<Address> getDefaultServers() throws IOException {
+ return getDefaultServers(listRSGroups());
+ }
+
+ // Called by ServerEventsListenerThread. Presume it has lock on this manager when it runs.
+ private SortedSet<Address> getDefaultServers(List<RSGroupInfo> rsGroupInfoList)
+ throws IOException {
// Build a list of servers in other groups than default group, from rsGroupMap
Set<Address> serversInOtherGroup = new HashSet<>();
- for (RSGroupInfo group : listRSGroups() /* get from rsGroupMap */) {
+ for (RSGroupInfo group : rsGroupInfoList) {
if (!RSGroupInfo.DEFAULT_GROUP.equals(group.getName())) { // not default group
serversInOtherGroup.addAll(group.getServers());
}