You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@doris.apache.org by "levy5307 (via GitHub)" <gi...@apache.org> on 2023/04/20 12:28:15 UTC

[GitHub] [doris] levy5307 opened a new pull request, #18873: [Feature](resource-group) Support drop resource group

levy5307 opened a new pull request, #18873:
URL: https://github.com/apache/doris/pull/18873

   # Proposed changes
   
   Issue Number: [close #xxx](https://github.com/apache/doris/issues/18098)
   
   ## Problem summary
   
   ```
   DROP RESOURCE GROUP group_name;
   ```
   
   ## Checklist(Required)
   
   * [ ] Does it affect the original behavior
   * [x] Has unit tests been added
   * [ ] Has document been added or modified
   * [ ] Does it need to update dependencies
   * [x] Is this PR support rollback (If NO, please explain WHY)
   
   ## Further comments
   
   If this is a relatively large or complex change, kick off the discussion at [dev@doris.apache.org](mailto:dev@doris.apache.org) by explaining why you chose the solution you did and what alternatives you considered, etc...
   
   


-- 
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: commits-unsubscribe@doris.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


---------------------------------------------------------------------
To unsubscribe, e-mail: commits-unsubscribe@doris.apache.org
For additional commands, e-mail: commits-help@doris.apache.org


[GitHub] [doris] luozenglin merged pull request #18873: [Feature](resource-group) Support drop resource group

Posted by "luozenglin (via GitHub)" <gi...@apache.org>.
luozenglin merged PR #18873:
URL: https://github.com/apache/doris/pull/18873


-- 
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: commits-unsubscribe@doris.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


---------------------------------------------------------------------
To unsubscribe, e-mail: commits-unsubscribe@doris.apache.org
For additional commands, e-mail: commits-help@doris.apache.org


[GitHub] [doris] levy5307 commented on pull request #18873: [Feature](resource-group) Support drop resource group

Posted by "levy5307 (via GitHub)" <gi...@apache.org>.
levy5307 commented on PR #18873:
URL: https://github.com/apache/doris/pull/18873#issuecomment-1518986047

   run buildall


-- 
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: commits-unsubscribe@doris.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


---------------------------------------------------------------------
To unsubscribe, e-mail: commits-unsubscribe@doris.apache.org
For additional commands, e-mail: commits-help@doris.apache.org


[GitHub] [doris] levy5307 commented on pull request #18873: [Feature](resource-group) Support drop resource group

Posted by "levy5307 (via GitHub)" <gi...@apache.org>.
levy5307 commented on PR #18873:
URL: https://github.com/apache/doris/pull/18873#issuecomment-1517143299

   run buildall


-- 
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: commits-unsubscribe@doris.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


---------------------------------------------------------------------
To unsubscribe, e-mail: commits-unsubscribe@doris.apache.org
For additional commands, e-mail: commits-help@doris.apache.org


[GitHub] [doris] levy5307 commented on pull request #18873: [Feature](resource-group) Support drop resource group

Posted by "levy5307 (via GitHub)" <gi...@apache.org>.
levy5307 commented on PR #18873:
URL: https://github.com/apache/doris/pull/18873#issuecomment-1518915569

   run buildall


-- 
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: commits-unsubscribe@doris.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


---------------------------------------------------------------------
To unsubscribe, e-mail: commits-unsubscribe@doris.apache.org
For additional commands, e-mail: commits-help@doris.apache.org


[GitHub] [doris] github-actions[bot] commented on pull request #18873: [Feature](resource-group) Support drop resource group

Posted by "github-actions[bot] (via GitHub)" <gi...@apache.org>.
github-actions[bot] commented on PR #18873:
URL: https://github.com/apache/doris/pull/18873#issuecomment-1519280042

   PR approved by at least one committer and no changes requested.


-- 
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: commits-unsubscribe@doris.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


---------------------------------------------------------------------
To unsubscribe, e-mail: commits-unsubscribe@doris.apache.org
For additional commands, e-mail: commits-help@doris.apache.org


[GitHub] [doris] levy5307 commented on pull request #18873: [Feature](resource-group) Support drop resource group

Posted by "levy5307 (via GitHub)" <gi...@apache.org>.
levy5307 commented on PR #18873:
URL: https://github.com/apache/doris/pull/18873#issuecomment-1517169065

   run buildall


-- 
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: commits-unsubscribe@doris.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


---------------------------------------------------------------------
To unsubscribe, e-mail: commits-unsubscribe@doris.apache.org
For additional commands, e-mail: commits-help@doris.apache.org


[GitHub] [doris] hello-stephen commented on pull request #18873: [Feature](resource-group) Support drop resource group

Posted by "hello-stephen (via GitHub)" <gi...@apache.org>.
hello-stephen commented on PR #18873:
URL: https://github.com/apache/doris/pull/18873#issuecomment-1517675733

   TeamCity pipeline, clickbench performance test result:
    the sum of best hot time: 33.96 seconds
    stream load tsv:          423 seconds loaded 74807831229 Bytes, about 168 MB/s
    stream load json:         24 seconds loaded 2358488459 Bytes, about 93 MB/s
    stream load orc:          58 seconds loaded 1101869774 Bytes, about 18 MB/s
    stream load parquet:          30 seconds loaded 861443392 Bytes, about 27 MB/s
    https://doris-community-test-1308700295.cos.ap-hongkong.myqcloud.com/tmp/20230421112005_clickbench_pr_132510.html


-- 
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: commits-unsubscribe@doris.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


---------------------------------------------------------------------
To unsubscribe, e-mail: commits-unsubscribe@doris.apache.org
For additional commands, e-mail: commits-help@doris.apache.org


[GitHub] [doris] wangbo commented on a diff in pull request #18873: [Feature](resource-group) Support drop resource group

Posted by "wangbo (via GitHub)" <gi...@apache.org>.
wangbo commented on code in PR #18873:
URL: https://github.com/apache/doris/pull/18873#discussion_r1174515721


##########
fe/fe-core/src/main/java/org/apache/doris/persist/DropResourceGroupOperationLog.java:
##########
@@ -0,0 +1,53 @@
+// Licensed to the Apache Software Foundation (ASF) under one
+// or more contributor license agreements.  See the NOTICE file
+// distributed with this work for additional information
+// regarding copyright ownership.  The ASF licenses this file
+// to you under the Apache License, Version 2.0 (the
+// "License"); you may not use this file except in compliance
+// with the License.  You may obtain a copy of the License at
+//
+//   http://www.apache.org/licenses/LICENSE-2.0
+//
+// Unless required by applicable law or agreed to in writing,
+// software distributed under the License is distributed on an
+// "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+// KIND, either express or implied.  See the License for the
+// specific language governing permissions and limitations
+// under the License.
+
+package org.apache.doris.persist;
+
+import org.apache.doris.common.io.Text;
+import org.apache.doris.common.io.Writable;
+import org.apache.doris.persist.gson.GsonUtils;
+
+import com.google.gson.annotations.SerializedName;
+
+import java.io.DataInput;
+import java.io.DataOutput;
+import java.io.IOException;
+
+/**
+ * For resource group drop
+ */
+public class DropResourceGroupOperationLog implements Writable {
+    @SerializedName(value = "name")
+    private String name;

Review Comment:
   I think it's better store id instead of name here, just like Drop a table(refer DropInfo.java).
    From the basic design logic of edit log, every LogEntry is immutable, and using append immuatble log way to implement mutable FE meta.
   While name is a mutable property, this will introduce additional thinking costs.
   Name is just used for return result to users, for Doris internal logic, id is the only identification.



-- 
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: commits-unsubscribe@doris.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


---------------------------------------------------------------------
To unsubscribe, e-mail: commits-unsubscribe@doris.apache.org
For additional commands, e-mail: commits-help@doris.apache.org


[GitHub] [doris] luozenglin commented on a diff in pull request #18873: [Feature](resource-group) Support drop resource group

Posted by "luozenglin (via GitHub)" <gi...@apache.org>.
luozenglin commented on code in PR #18873:
URL: https://github.com/apache/doris/pull/18873#discussion_r1174497344


##########
fe/fe-core/src/main/java/org/apache/doris/resource/resourcegroup/ResourceGroupMgr.java:
##########
@@ -149,6 +151,30 @@ public void createResourceGroup(CreateResourceGroupStmt stmt) throws DdlExceptio
         LOG.info("Create resource group success: {}", resourceGroup);
     }
 
+    public void dropResourceGroup(DropResourceGroupStmt stmt) throws DdlException {
+        if (!Config.enable_resource_group) {
+            throw new DdlException("unsupported feature now, coming soon.");
+        }
+
+        String resourceGroupName = stmt.getResourceGroupName();

Review Comment:
   The default resource group should not be allowed to be dropped.



-- 
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: commits-unsubscribe@doris.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


---------------------------------------------------------------------
To unsubscribe, e-mail: commits-unsubscribe@doris.apache.org
For additional commands, e-mail: commits-help@doris.apache.org


[GitHub] [doris] levy5307 commented on pull request #18873: [Feature](resource-group) Support drop resource group

Posted by "levy5307 (via GitHub)" <gi...@apache.org>.
levy5307 commented on PR #18873:
URL: https://github.com/apache/doris/pull/18873#issuecomment-1519031012

   run buildall


-- 
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: commits-unsubscribe@doris.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


---------------------------------------------------------------------
To unsubscribe, e-mail: commits-unsubscribe@doris.apache.org
For additional commands, e-mail: commits-help@doris.apache.org


[GitHub] [doris] levy5307 commented on pull request #18873: [Feature](resource-group) Support drop resource group

Posted by "levy5307 (via GitHub)" <gi...@apache.org>.
levy5307 commented on PR #18873:
URL: https://github.com/apache/doris/pull/18873#issuecomment-1517178334

   run buildall


-- 
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: commits-unsubscribe@doris.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


---------------------------------------------------------------------
To unsubscribe, e-mail: commits-unsubscribe@doris.apache.org
For additional commands, e-mail: commits-help@doris.apache.org


[GitHub] [doris] levy5307 commented on pull request #18873: [Feature](resource-group) Support drop resource group

Posted by "levy5307 (via GitHub)" <gi...@apache.org>.
levy5307 commented on PR #18873:
URL: https://github.com/apache/doris/pull/18873#issuecomment-1517207922

   run buildall


-- 
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: commits-unsubscribe@doris.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


---------------------------------------------------------------------
To unsubscribe, e-mail: commits-unsubscribe@doris.apache.org
For additional commands, e-mail: commits-help@doris.apache.org


[GitHub] [doris] wangbo commented on a diff in pull request #18873: [Feature](resource-group) Support drop resource group

Posted by "wangbo (via GitHub)" <gi...@apache.org>.
wangbo commented on code in PR #18873:
URL: https://github.com/apache/doris/pull/18873#discussion_r1174515721


##########
fe/fe-core/src/main/java/org/apache/doris/persist/DropResourceGroupOperationLog.java:
##########
@@ -0,0 +1,53 @@
+// Licensed to the Apache Software Foundation (ASF) under one
+// or more contributor license agreements.  See the NOTICE file
+// distributed with this work for additional information
+// regarding copyright ownership.  The ASF licenses this file
+// to you under the Apache License, Version 2.0 (the
+// "License"); you may not use this file except in compliance
+// with the License.  You may obtain a copy of the License at
+//
+//   http://www.apache.org/licenses/LICENSE-2.0
+//
+// Unless required by applicable law or agreed to in writing,
+// software distributed under the License is distributed on an
+// "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+// KIND, either express or implied.  See the License for the
+// specific language governing permissions and limitations
+// under the License.
+
+package org.apache.doris.persist;
+
+import org.apache.doris.common.io.Text;
+import org.apache.doris.common.io.Writable;
+import org.apache.doris.persist.gson.GsonUtils;
+
+import com.google.gson.annotations.SerializedName;
+
+import java.io.DataInput;
+import java.io.DataOutput;
+import java.io.IOException;
+
+/**
+ * For resource group drop
+ */
+public class DropResourceGroupOperationLog implements Writable {
+    @SerializedName(value = "name")
+    private String name;

Review Comment:
   I think it's better store id instead of name here, just like Drop a table(refer DropInfo.java).
    From the basic design logic of edit log, every LogEntry is immutable, and using append immuatble log way to implement mutable FE meta.
   While tablename is a mutable property, this will introduce additional thinking costs.



-- 
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: commits-unsubscribe@doris.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


---------------------------------------------------------------------
To unsubscribe, e-mail: commits-unsubscribe@doris.apache.org
For additional commands, e-mail: commits-help@doris.apache.org


[GitHub] [doris] levy5307 commented on pull request #18873: [Feature](resource-group) Support drop resource group

Posted by "levy5307 (via GitHub)" <gi...@apache.org>.
levy5307 commented on PR #18873:
URL: https://github.com/apache/doris/pull/18873#issuecomment-1518952275

   run buildall


-- 
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: commits-unsubscribe@doris.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


---------------------------------------------------------------------
To unsubscribe, e-mail: commits-unsubscribe@doris.apache.org
For additional commands, e-mail: commits-help@doris.apache.org


[GitHub] [doris] levy5307 commented on pull request #18873: [Feature](resource-group) Support drop resource group

Posted by "levy5307 (via GitHub)" <gi...@apache.org>.
levy5307 commented on PR #18873:
URL: https://github.com/apache/doris/pull/18873#issuecomment-1517292718

   run buildall


-- 
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: commits-unsubscribe@doris.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


---------------------------------------------------------------------
To unsubscribe, e-mail: commits-unsubscribe@doris.apache.org
For additional commands, e-mail: commits-help@doris.apache.org


[GitHub] [doris] levy5307 commented on pull request #18873: [Feature](resource-group) Support drop resource group

Posted by "levy5307 (via GitHub)" <gi...@apache.org>.
levy5307 commented on PR #18873:
URL: https://github.com/apache/doris/pull/18873#issuecomment-1517649802

   run buildall


-- 
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: commits-unsubscribe@doris.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


---------------------------------------------------------------------
To unsubscribe, e-mail: commits-unsubscribe@doris.apache.org
For additional commands, e-mail: commits-help@doris.apache.org


[GitHub] [doris] levy5307 commented on a diff in pull request #18873: [Feature](resource-group) Support drop resource group

Posted by "levy5307 (via GitHub)" <gi...@apache.org>.
levy5307 commented on code in PR #18873:
URL: https://github.com/apache/doris/pull/18873#discussion_r1174500789


##########
fe/fe-core/src/main/java/org/apache/doris/resource/resourcegroup/ResourceGroupMgr.java:
##########
@@ -149,6 +151,30 @@ public void createResourceGroup(CreateResourceGroupStmt stmt) throws DdlExceptio
         LOG.info("Create resource group success: {}", resourceGroup);
     }
 
+    public void dropResourceGroup(DropResourceGroupStmt stmt) throws DdlException {
+        if (!Config.enable_resource_group) {
+            throw new DdlException("unsupported feature now, coming soon.");
+        }
+
+        String resourceGroupName = stmt.getResourceGroupName();

Review Comment:
   Done



-- 
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: commits-unsubscribe@doris.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


---------------------------------------------------------------------
To unsubscribe, e-mail: commits-unsubscribe@doris.apache.org
For additional commands, e-mail: commits-help@doris.apache.org


[GitHub] [doris] github-actions[bot] commented on pull request #18873: [Feature](resource-group) Support drop resource group

Posted by "github-actions[bot] (via GitHub)" <gi...@apache.org>.
github-actions[bot] commented on PR #18873:
URL: https://github.com/apache/doris/pull/18873#issuecomment-1519280095

   PR approved by anyone and no changes requested.


-- 
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: commits-unsubscribe@doris.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


---------------------------------------------------------------------
To unsubscribe, e-mail: commits-unsubscribe@doris.apache.org
For additional commands, e-mail: commits-help@doris.apache.org