You are viewing a plain text version of this content. The canonical link for it is here.
Posted to issues@hbase.apache.org by GitBox <gi...@apache.org> on 2020/07/14 09:44:47 UTC

[GitHub] [hbase] arshadmohammad commented on a change in pull request #2059: HBASE-24721: rename_rsgroup overwriting the existing rsgroup.

arshadmohammad commented on a change in pull request #2059:
URL: https://github.com/apache/hbase/pull/2059#discussion_r454235171



##########
File path: hbase-server/src/main/java/org/apache/hadoop/hbase/rsgroup/RSGroupInfoManagerImpl.java
##########
@@ -1227,9 +1227,13 @@ public synchronized void renameRSGroup(String oldName, String newName) throws IO
       throw new ConstraintException(RSGroupInfo.DEFAULT_GROUP + " can't be rename");
     }
     checkGroupName(newName);
-
+    //getRSGroupInfo validates old RSGroup existence.
     RSGroupInfo oldRSG = getRSGroupInfo(oldName);
     Map<String, RSGroupInfo> rsGroupMap = holder.groupName2Group;
+    if (rsGroupMap.get(newName) != null) {

Review comment:
       handled, used rsGroupMap.containsKey() 




----------------------------------------------------------------
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:
users@infra.apache.org