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 2022/06/08 02:15:14 UTC

[GitHub] [dolphinscheduler] caishunfeng commented on a diff in pull request #10371: Optimize MasterServer, add MasterRPCService

caishunfeng commented on code in PR #10371:
URL: https://github.com/apache/dolphinscheduler/pull/10371#discussion_r891846940


##########
dolphinscheduler-master/src/main/java/org/apache/dolphinscheduler/server/master/processor/queue/TaskExecuteRunnable.java:
##########
@@ -116,12 +116,12 @@ private void persist(TaskEvent taskEvent) {
         int taskInstanceId = taskEvent.getTaskInstanceId();
         int processInstanceId = taskEvent.getProcessInstanceId();
 
-        TaskInstance taskInstance;
-        WorkflowExecuteThread workflowExecuteThread = this.processInstanceExecCacheManager.getByProcessInstanceId(processInstanceId);
+        Optional<TaskInstance> taskInstance;
+        WorkflowExecuteRunnable workflowExecuteThread = this.processInstanceExecCacheManager.getByProcessInstanceId(processInstanceId);

Review Comment:
   ```suggestion
           WorkflowExecuteRunnable workflowExecuteRunable = this.processInstanceExecCacheManager.getByProcessInstanceId(processInstanceId);
   ```



##########
dolphinscheduler-master/src/main/java/org/apache/dolphinscheduler/server/master/MasterServer.java:
##########
@@ -191,10 +136,15 @@ public void close(String cause) {
             // close
             this.schedulerApi.close();
             this.masterSchedulerService.close();
-            this.nettyRemotingServer.close();
+            try (MasterRPCServer closeServer = this.masterRPCServer) {

Review Comment:
   looks a little weird



##########
dolphinscheduler-master/src/main/java/org/apache/dolphinscheduler/server/master/processor/queue/TaskExecuteThreadPool.java:
##########
@@ -83,26 +83,26 @@ public void submitTaskEvent(TaskEvent taskEvent) {
             return;
         }
         if (!taskExecuteThreadMap.containsKey(taskEvent.getProcessInstanceId())) {
-            TaskExecuteThread taskExecuteThread = new TaskExecuteThread(
+            TaskExecuteRunnable taskExecuteThread = new TaskExecuteRunnable(
                     taskEvent.getProcessInstanceId(),
                     processService, workflowExecuteThreadPool,
                     processInstanceExecCacheManager,
                     dataQualityResultOperator);
             taskExecuteThreadMap.put(taskEvent.getProcessInstanceId(), taskExecuteThread);
         }
-        TaskExecuteThread taskExecuteThread = taskExecuteThreadMap.get(taskEvent.getProcessInstanceId());
+        TaskExecuteRunnable taskExecuteThread = taskExecuteThreadMap.get(taskEvent.getProcessInstanceId());

Review Comment:
   ```suggestion
           TaskExecuteRunnable taskExecuteRunnable= taskExecuteThreadMap.get(taskEvent.getProcessInstanceId());
   ```



-- 
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@dolphinscheduler.apache.org

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