mansonliwh commented on code in PR #3457:
URL: https://github.com/apache/amoro/pull/3457#discussion_r1992877768


##########
amoro-ams/src/main/java/org/apache/amoro/server/resource/DefaultOptimizerManager.java:
##########
@@ -125,4 +149,35 @@ public List<Resource> listResourcesByGroup(String 
groupName) {
   public Resource getResource(String resourceId) {
     return getAs(ResourceMapper.class, mapper -> 
mapper.selectResource(resourceId));
   }
+
+  @Override
+  public boolean canDeleteResourceGroup(String name) {
+    for (CatalogMeta catalogMeta : catalogManager.listCatalogMetas()) {
+      if (catalogMeta.getCatalogProperties() != null
+          && catalogMeta
+              .getCatalogProperties()
+              .getOrDefault(
+                  CatalogMetaProperties.TABLE_PROPERTIES_PREFIX
+                      + TableProperties.SELF_OPTIMIZING_GROUP,
+                  TableProperties.SELF_OPTIMIZING_GROUP_DEFAULT)
+              .equals(name)) {
+        return false;
+      }
+    }
+    for (OptimizerInstance optimizer : listOptimizers()) {
+      if (optimizer.getGroupName().equals(name)) {
+        return false;
+      }
+    }
+    List<String> tableRuntimeMetas =

Review Comment:
   I've removed this method.



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

Reply via email to