infraio commented on a change in pull request #2126:
URL: https://github.com/apache/hbase/pull/2126#discussion_r479244607
##########
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:
I didn't follow this. DEFAULT_GROUP don't need this?
----------------------------------------------------------------
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]