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/09/30 14:31:12 UTC

[GitHub] [dolphinscheduler] caishunfeng commented on a diff in pull request #12152: [DS-12131][master] Optimize the log printing of the master module acc…

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


##########
dolphinscheduler-master/src/main/java/org/apache/dolphinscheduler/server/master/runner/WorkflowExecuteThreadPool.java:
##########
@@ -159,8 +159,10 @@ private void notifyProcessChanged(ProcessInstance finishProcessInstance) {
             TaskInstance taskInstance = entry.getValue();
             String address = NetUtils.getAddr(masterConfig.getListenPort());
             if (processInstance.getHost().equalsIgnoreCase(address)) {
+                logger.info("Process host is local master, will notify it");
                 this.notifyMyself(processInstance, taskInstance);
             } else {
+                logger.info("Process host is remote master, will notify it");

Review Comment:
   same here



##########
dolphinscheduler-master/src/main/java/org/apache/dolphinscheduler/server/master/runner/WorkflowExecuteThreadPool.java:
##########
@@ -159,8 +159,10 @@ private void notifyProcessChanged(ProcessInstance finishProcessInstance) {
             TaskInstance taskInstance = entry.getValue();
             String address = NetUtils.getAddr(masterConfig.getListenPort());
             if (processInstance.getHost().equalsIgnoreCase(address)) {
+                logger.info("Process host is local master, will notify it");

Review Comment:
   add taskInstanceId and workflowId



##########
dolphinscheduler-master/src/main/java/org/apache/dolphinscheduler/server/master/runner/task/CommonTaskProcessor.java:
##########
@@ -122,17 +122,17 @@ public boolean dispatchTask() {
 
             TaskExecutionContext taskExecutionContext = getTaskExecutionContext(taskInstance);
             if (taskExecutionContext == null) {
-                logger.error("task get taskExecutionContext fail: {}", taskInstance);
+                logger.error("Get taskExecutionContext fail, task: {}", taskInstance);
                 return false;
             }
 
             taskPriority.setTaskExecutionContext(taskExecutionContext);
 
             taskUpdateQueue.put(taskPriority);
-            logger.info("Master submit task to priority queue success, taskInstanceId : {}", taskInstance.getId());
+            logger.info("Task {} is submitted to priority queue success by master", taskInstance.getName());
             return true;
         } catch (Exception e) {
-            logger.error("submit task error", e);
+            logger.info("Task {} is submitted to priority queue error", taskInstance.getName(), e);

Review Comment:
   ```suggestion
               logger.error("Task {} is submitted to priority queue error", taskInstance.getName(), e);
   ```



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