SbloodyS commented on code in PR #11670:
URL: https://github.com/apache/dolphinscheduler/pull/11670#discussion_r973544587


##########
dolphinscheduler-common/src/main/java/org/apache/dolphinscheduler/common/Constants.java:
##########
@@ -851,6 +851,13 @@ private Constants() {
     public static final String SECURITY_CONFIG_TYPE_PASSWORD = "PASSWORD";
 
     public static final String SECURITY_CONFIG_TYPE_LDAP = "LDAP";
+
+    /**
+     * test flag
+     */
+    public static final int TEST_FLAG_NO = 0;
+    public static final int TEST_FLAG_YES = 1;

Review Comment:
   It's better to create enumeration for it instead of this.



##########
dolphinscheduler-master/src/main/java/org/apache/dolphinscheduler/server/master/runner/task/CommonTaskProcessor.java:
##########
@@ -171,4 +181,26 @@ private void killRemoteTask() throws ExecuteException {
 
         nettyExecutorManager.executeDirectly(executionContext);
     }
+
+    protected void convertExeEnvironmentOnlineToTest() {
+        //SQL taskType
+        if (TaskConstants.TASK_TYPE_SQL.equals(taskInstance.getTaskType())) {
+            //replace test data source
+            Map<String, Object> taskDefinitionParams = 
JSONUtils.parseObject(taskInstance.getTaskDefine().getTaskParams(), new 
TypeReference<Map<String, Object>>() {
+            });
+            Map<String, Object> taskInstanceParams = 
JSONUtils.parseObject(taskInstance.getTaskParams(), new 
TypeReference<Map<String, Object>>() {
+            });

Review Comment:
   We should avoid using map here.



##########
dolphinscheduler-dao/src/main/java/org/apache/dolphinscheduler/dao/entity/DataSource.java:
##########
@@ -17,6 +17,7 @@
 
 package org.apache.dolphinscheduler.dao.entity;
 
+import com.baomidou.mybatisplus.annotation.*;

Review Comment:
   This should be avoided. cc @EricGao888 



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