ddupg commented on a change in pull request #2126:
URL: https://github.com/apache/hbase/pull/2126#discussion_r479612845



##########
File path: 
hbase-server/src/main/java/org/apache/hadoop/hbase/rsgroup/RSGroupInfoManagerImpl.java
##########
@@ -709,6 +713,22 @@ private void saveRSGroupMapToZK(Map<String, RSGroupInfo> 
newGroupMap) throws IOE
     }
   }
 
+  /**
+   * Convert to {@link RSGroupProtos.RSGroupInfo} to store in zk and 
hbase:rsgroup table.
+   * Ignore group's tables and servers if group is the default
+   * @param rsGroupInfo need to persist
+   * @return converted proto
+   */
+  private RSGroupProtos.RSGroupInfo toProtoGroupInfoForPersisting(RSGroupInfo 
rsGroupInfo) {
+    if (!rsGroupInfo.getName().equals(RSGroupInfo.DEFAULT_GROUP)) {
+      return ProtobufUtil.toProtoGroupInfo(rsGroupInfo);
+    } else {
+      RSGroupInfo defaultGroupInfo = new RSGroupInfo(rsGroupInfo.getName());
+      
rsGroupInfo.getConfiguration().forEach(defaultGroupInfo::setConfiguration);

Review comment:
       Yean, after 
[HBASE-22820](https://issues.apache.org/jira/browse/HBASE-22820), we do not 
persist default group any more. So in this patch, just persist the 
configuration of default group. As for servers of default group, it is set 
while `refresh()`.




----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

For queries about this service, please contact Infrastructure at:
[email protected]


Reply via email to