gavinchou commented on code in PR #46221:
URL: https://github.com/apache/doris/pull/46221#discussion_r1900423160


##########
fe/fe-core/src/main/java/org/apache/doris/cloud/system/CloudSystemInfoService.java:
##########
@@ -1158,4 +1158,44 @@ public String getInstanceId(String cloudUniqueId) throws 
IOException {
             throw new IOException("Failed to get instance info");
         }
     }
+
+    public void renameComputeGroup(String originalName, String newGroupName) 
throws UserException {
+        String cloudInstanceId = ((CloudEnv) 
Env.getCurrentEnv()).getCloudInstanceId();
+        if (Strings.isNullOrEmpty(cloudInstanceId)) {
+            throw new DdlException("unable to rename compute group due to 
empty cloud_instance_id");
+        }
+        String originalComputeGroupId = ((CloudSystemInfoService) 
Env.getCurrentSystemInfo())
+                .getCloudClusterIdByName(originalName);
+        if (Strings.isNullOrEmpty(originalComputeGroupId)) {
+            throw new DdlException("unable to rename compute group, "

Review Comment:
   the message is not informative to user,
   suggest error msg
   "compute group '" + originalName + "' not found, unable to rename"



-- 
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.

To unsubscribe, e-mail: [email protected]

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


---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]

Reply via email to