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/07/22 05:53:45 UTC

[GitHub] [dolphinscheduler] zhuangchong commented on a diff in pull request #11099: [Fix-11051][Task]Fix the process exitValue exception when the process times out and th…

zhuangchong commented on code in PR #11099:
URL: https://github.com/apache/dolphinscheduler/pull/11099#discussion_r927312949


##########
dolphinscheduler-task-plugin/dolphinscheduler-task-api/src/main/java/org/apache/dolphinscheduler/plugin/task/api/AbstractCommandExecutor.java:
##########
@@ -237,8 +237,8 @@ public TaskResponse run(String execCommand) throws IOException, InterruptedExcep
             result.setExitStatusCode(process.exitValue());
 
         } else {
-            logger.error("process has failure , exitStatusCode:{}, processExitValue:{}, ready to kill ...",
-                    result.getExitStatusCode(), process.exitValue());
+            logger.error("process has failure , the task timeout configuration value is:{}, ready to kill ...",
+                    result.getExitStatusCode(), taskRequest.getTaskTimeout());

Review Comment:
   When the process.waitFor execution times out and the process process is still alive, an exception will be thrown when the process.exitValue() method is executed. I don't think it is necessary to print process.exitValue here, because this information is already printed later.
   
   
   https://github.com/apache/dolphinscheduler/blob/a868259c47632c52f808b28c8fe15407514a299e/dolphinscheduler-task-plugin/dolphinscheduler-task-api/src/main/java/org/apache/dolphinscheduler/plugin/task/api/AbstractCommandExecutor.java#L228
   
   
   https://github.com/apache/dolphinscheduler/blob/a868259c47632c52f808b28c8fe15407514a299e/dolphinscheduler-task-plugin/dolphinscheduler-task-api/src/main/java/org/apache/dolphinscheduler/plugin/task/api/AbstractCommandExecutor.java#L246



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