OneSizeFitsQuorum commented on code in PR #14678:
URL: https://github.com/apache/iotdb/pull/14678#discussion_r1922993265
##########
integration-test/src/test/java/org/apache/iotdb/confignode/it/removedatanode/IoTDBRemoveDataNodeITFramework.java:
##########
@@ -66,6 +69,10 @@ public class IoTDBRemoveDataNodeITFramework {
private static final String defaultSchemaRegionGroupExtensionPolicy =
"CUSTOM";
private static final String defaultDataRegionGroupExtensionPolicy = "CUSTOM";
+ public static final int NOT_USE_SQL = 0;
Review Comment:
use enum?
##########
iotdb-core/datanode/src/main/java/org/apache/iotdb/db/queryengine/plan/statement/metadata/RemoveDataNodeStatement.java:
##########
@@ -0,0 +1,60 @@
+/*
+ * 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.iotdb.db.queryengine.plan.statement.metadata;
+
+import org.apache.iotdb.commons.path.PartialPath;
+import org.apache.iotdb.db.queryengine.plan.analyze.QueryType;
+import org.apache.iotdb.db.queryengine.plan.statement.IConfigStatement;
+import org.apache.iotdb.db.queryengine.plan.statement.Statement;
+import org.apache.iotdb.db.queryengine.plan.statement.StatementVisitor;
+
+import java.util.Collections;
+import java.util.HashSet;
+import java.util.List;
+import java.util.Set;
+
+public class RemoveDataNodeStatement extends Statement implements
IConfigStatement {
Review Comment:
override checkPermissionBeforeProcess?The maintain permission can also do
this. Please also check region migration related permissions
<img width="886" alt="image"
src="https://github.com/user-attachments/assets/132ac303-32fe-4746-97a9-9632be8274fd"
/>
##########
iotdb-core/antlr/src/main/antlr4/org/apache/iotdb/db/qp/sql/IoTDBSqlParser.g4:
##########
@@ -536,6 +536,11 @@ verifyConnection
: VERIFY CONNECTION (DETAILS)?
;
+// ---- Remove DataNode
+removeDataNode
+ : REMOVE DATANODE dataNodeId=INTEGER_LITERAL (COMMA
dataNodeId=INTEGER_LITERAL)*
Review Comment:
I'm ok with current implementation because we use `remove-datanode.sh`
--
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]