This is an automated email from the ASF dual-hosted git repository.

kirs pushed a commit to branch dev
in repository https://gitbox.apache.org/repos/asf/dolphinscheduler.git


The following commit(s) were added to refs/heads/dev by this push:
     new 3b80760  Improved shell task execution result log information, adding 
process.waitFor() and process.exitValue() information to the original log 
(#5691)
3b80760 is described below

commit 3b80760c42e4d3208349969a9ec9d5ee1ed86222
Author: ji04xiaogang <[email protected]>
AuthorDate: Fri Jun 25 09:13:26 2021 +0800

    Improved shell task execution result log information, adding 
process.waitFor() and process.exitValue() information to the original log 
(#5691)
    
    Co-authored-by: shenglm <[email protected]>
---
 .../server/worker/task/AbstractCommandExecutor.java                | 7 ++++---
 1 file changed, 4 insertions(+), 3 deletions(-)

diff --git 
a/dolphinscheduler-server/src/main/java/org/apache/dolphinscheduler/server/worker/task/AbstractCommandExecutor.java
 
b/dolphinscheduler-server/src/main/java/org/apache/dolphinscheduler/server/worker/task/AbstractCommandExecutor.java
index e408f11..5241f5f 100644
--- 
a/dolphinscheduler-server/src/main/java/org/apache/dolphinscheduler/server/worker/task/AbstractCommandExecutor.java
+++ 
b/dolphinscheduler-server/src/main/java/org/apache/dolphinscheduler/server/worker/task/AbstractCommandExecutor.java
@@ -207,8 +207,8 @@ public abstract class AbstractCommandExecutor {
         // waiting for the run to finish
         boolean status = process.waitFor(remainTime, TimeUnit.SECONDS);
 
-        logger.info("process has exited, execute path:{}, processId:{} 
,exitStatusCode:{}",
-            taskExecutionContext.getExecutePath(), processId, 
result.getExitStatusCode());
+        logger.info("process has exited, execute path:{}, processId:{} 
,exitStatusCode:{} ,processWaitForStatus:{} ,processExitValue:{}",
+            taskExecutionContext.getExecutePath(), processId, 
result.getExitStatusCode(), status, process.exitValue());
 
         // if SHELL task exit
         if (status) {
@@ -224,7 +224,8 @@ public abstract class AbstractCommandExecutor {
                 result.setExitStatusCode(isSuccessOfYarnState(appIds) ? 
EXIT_CODE_SUCCESS : EXIT_CODE_FAILURE);
             }
         } else {
-            logger.error("process has failure , exitStatusCode : {} , ready to 
kill ...", result.getExitStatusCode());
+            logger.error("process has failure , exitStatusCode:{}, 
processExitValue:{}, ready to kill ...",
+                 result.getExitStatusCode(), process.exitValue());
             ProcessUtils.kill(taskExecutionContext);
             result.setExitStatusCode(EXIT_CODE_FAILURE);
         }

Reply via email to