You are viewing a plain text version of this content. The canonical link for it is here.
Posted to reviews@iotdb.apache.org by GitBox <gi...@apache.org> on 2022/04/25 15:57:26 UTC
[GitHub] [iotdb] RYH61 commented on a diff in pull request #5664: [IOTDB-3005] Increase read and write permissions in ConfigExecution
RYH61 commented on code in PR #5664:
URL: https://github.com/apache/iotdb/pull/5664#discussion_r857787424
##########
server/src/main/java/org/apache/iotdb/db/mpp/execution/config/AuthorizerConfigTask.java:
##########
@@ -19,38 +19,32 @@
package org.apache.iotdb.db.mpp.execution.config;
-import org.apache.iotdb.common.rpc.thrift.TSStatus;
-import org.apache.iotdb.commons.exception.BadNodeUrlException;
import org.apache.iotdb.confignode.rpc.thrift.TAuthorizerReq;
import org.apache.iotdb.db.auth.AuthException;
-import org.apache.iotdb.db.client.ConfigNodeClient;
-import org.apache.iotdb.db.mpp.sql.planner.plan.node.metedata.write.AuthorNode;
+import org.apache.iotdb.db.auth.authorizer.AuthorizerManager;
+import org.apache.iotdb.db.mpp.sql.analyze.QueryType;
import org.apache.iotdb.db.mpp.sql.statement.sys.AuthorStatement;
-import org.apache.iotdb.rpc.IoTDBConnectionException;
-import org.apache.iotdb.rpc.StatementExecutionException;
-import org.apache.iotdb.rpc.TSStatusCode;
+import org.apache.iotdb.db.qp.physical.sys.AuthorPlan;
import com.google.common.util.concurrent.ListenableFuture;
import com.google.common.util.concurrent.SettableFuture;
import org.slf4j.Logger;
import org.slf4j.LoggerFactory;
-import java.util.Locale;
-
public class AuthorizerConfigTask implements IConfigTask {
private static final Logger LOGGER = LoggerFactory.getLogger(AuthorizerConfigTask.class);
private AuthorStatement authorStatement;
+ private AuthorizerManager authorizerManager = AuthorizerManager.getInstance();
Review Comment:
fix
##########
server/src/main/java/org/apache/iotdb/db/mpp/execution/Coordinator.java:
##########
@@ -75,7 +74,7 @@ private IQueryExecution createQueryExecution(
IPartitionFetcher partitionFetcher,
ISchemaFetcher schemaFetcher) {
if (statement instanceof ConfigStatement) {
- queryContext.setQueryType(QueryType.WRITE);
+ queryContext.setQueryType(ConfigExecution.operateIsQuery((ConfigStatement) statement));
Review Comment:
fix
--
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: reviews-unsubscribe@iotdb.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org