You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@dolphinscheduler.apache.org by GitBox <gi...@apache.org> on 2020/12/29 02:11:10 UTC

[GitHub] [incubator-dolphinscheduler] gaojun2048 commented on a change in pull request #4303: [Feature-#3828][server] Delete recipients and CCs in the process defi…

gaojun2048 commented on a change in pull request #4303:
URL: https://github.com/apache/incubator-dolphinscheduler/pull/4303#discussion_r549540807



##########
File path: dolphinscheduler-api/src/main/java/org/apache/dolphinscheduler/api/controller/ExecutorController.java
##########
@@ -74,20 +90,20 @@
      */
     @ApiOperation(value = "startProcessInstance", notes = "RUN_PROCESS_INSTANCE_NOTES")
     @ApiImplicitParams({
-            @ApiImplicitParam(name = "processDefinitionId", value = "PROCESS_DEFINITION_ID", required = true, dataType = "Int", example = "100"),
-            @ApiImplicitParam(name = "scheduleTime", value = "SCHEDULE_TIME", required = true, dataType = "String"),
-            @ApiImplicitParam(name = "failureStrategy", value = "FAILURE_STRATEGY", required = true, dataType = "FailureStrategy"),
-            @ApiImplicitParam(name = "startNodeList", value = "START_NODE_LIST", dataType = "String"),
-            @ApiImplicitParam(name = "taskDependType", value = "TASK_DEPEND_TYPE", dataType = "TaskDependType"),
-            @ApiImplicitParam(name = "execType", value = "COMMAND_TYPE", dataType = "CommandType"),
-            @ApiImplicitParam(name = "warningType", value = "WARNING_TYPE", required = true, dataType = "WarningType"),
-            @ApiImplicitParam(name = "warningGroupId", value = "WARNING_GROUP_ID", required = true, dataType = "Int", example = "100"),
-            @ApiImplicitParam(name = "receivers", value = "RECEIVERS", dataType = "String"),
-            @ApiImplicitParam(name = "receiversCc", value = "RECEIVERS_CC", dataType = "String"),
-            @ApiImplicitParam(name = "runMode", value = "RUN_MODE", dataType = "RunMode"),
-            @ApiImplicitParam(name = "processInstancePriority", value = "PROCESS_INSTANCE_PRIORITY", required = true, dataType = "Priority"),
-            @ApiImplicitParam(name = "workerGroup", value = "WORKER_GROUP", dataType = "String", example = "default"),
-            @ApiImplicitParam(name = "timeout", value = "TIMEOUT", dataType = "Int", example = "100"),
+        @ApiImplicitParam(name = "processDefinitionId", value = "PROCESS_DEFINITION_ID", required = true, dataType = "Int", example = "100"),
+        @ApiImplicitParam(name = "scheduleTime", value = "SCHEDULE_TIME", required = true, dataType = "String"),
+        @ApiImplicitParam(name = "failureStrategy", value = "FAILURE_STRATEGY", required = true, dataType = "FailureStrategy"),
+        @ApiImplicitParam(name = "startNodeList", value = "START_NODE_LIST", dataType = "String"),
+        @ApiImplicitParam(name = "taskDependType", value = "TASK_DEPEND_TYPE", dataType = "TaskDependType"),
+        @ApiImplicitParam(name = "execType", value = "COMMAND_TYPE", dataType = "CommandType"),
+        @ApiImplicitParam(name = "warningType", value = "WARNING_TYPE", required = true, dataType = "WarningType"),
+        @ApiImplicitParam(name = "warningGroupId", value = "WARNING_GROUP_ID", required = true, dataType = "Int", example = "100"),
+        @ApiImplicitParam(name = "receivers", value = "RECEIVERS", dataType = "String"),

Review comment:
       Why is there still receivers and receiversCc here ?

##########
File path: dolphinscheduler-dao/src/main/java/org/apache/dolphinscheduler/dao/AlertDao.java
##########
@@ -99,31 +97,31 @@ public int updateAlert(AlertStatus alertStatus, String log, int id) {
     /**
      * query user list by alert group id
      *
-     * @param alerGroupId alerGroupId
+     * @param alertGroupId alertGroupId
      * @return user list
      */
-    public List<User> queryUserByAlertGroupId(int alerGroupId) {
+    public List<User> queryUserByAlertGroupId(int alertGroupId) {

Review comment:
       I think alert group and user no longer have any relationship in this feature. So this method need be delete.

##########
File path: dolphinscheduler-dao/src/main/java/org/apache/dolphinscheduler/dao/mapper/UserAlertGroupMapper.java
##########
@@ -30,16 +30,18 @@
 
     /**
      * delete user alertgroup relation by alertgroupId
-     * @param alertgroupId alertgroupId
+     *
+     * @param alertGroupId alertGroupId
      * @return delete result
      */
-    int deleteByAlertgroupId(@Param("alertgroupId") int alertgroupId);
+    int deleteByAlertGroupId(@Param("alertgroupId") int alertGroupId);
 
     /**
-     *  list user by alertgroupId
-     * @param alertgroupId alertgroupId
+     * list user by alertgroupId
+     *
+     * @param alertGroupId alertgroupId
      * @return user list
      */
-    List<User> listUserByAlertgroupId(@Param("alertgroupId") int alertgroupId);
+    List<User> listUserByAlertGroupId(@Param("alertgroupId") int alertGroupId);

Review comment:
       UserAlertGroupMapper is need be delete in this feature.

##########
File path: dolphinscheduler-dao/src/main/java/org/apache/dolphinscheduler/dao/AlertDao.java
##########
@@ -207,11 +193,11 @@ public void sendTaskTimeoutAlert(int alertgroupId, String receivers, String rece
     /**
      * list user information by alert group id
      *
-     * @param alertgroupId alertgroupId
+     * @param alertGroupId alertGroupId
      * @return user list
      */
-    public List<User> listUserByAlertgroupId(int alertgroupId) {
-        return userAlertGroupMapper.listUserByAlertgroupId(alertgroupId);
+    public List<User> listUserByAlertGroupId(int alertGroupId) {
+        return userAlertGroupMapper.listUserByAlertGroupId(alertGroupId);

Review comment:
       UserAlertGroupMapper need be delete in this feature.




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

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