|
20 | 20 | import static org.apache.dolphinscheduler.common.constants.Constants.EMPTY_STRING; |
21 | 21 | import static org.apache.dolphinscheduler.common.constants.Constants.SLEEP_TIME_MILLIS; |
22 | 22 | import static org.apache.dolphinscheduler.plugin.task.api.TaskConstants.EXIT_CODE_FAILURE; |
| 23 | +import static org.apache.dolphinscheduler.plugin.task.api.TaskConstants.EXIT_CODE_HARD_KILL; |
23 | 24 | import static org.apache.dolphinscheduler.plugin.task.api.TaskConstants.EXIT_CODE_KILL; |
24 | 25 |
|
25 | 26 | import org.apache.dolphinscheduler.common.thread.ThreadUtils; |
@@ -190,13 +191,13 @@ public TaskResponse run(IShellInterceptorBuilder iShellInterceptorBuilder, |
190 | 191 | result.setExitStatusCode(this.process.exitValue()); |
191 | 192 |
|
192 | 193 | } else { |
193 | | - log.error("process has failure, the task timeout configuration value is:{}, ready to kill ...", |
194 | | - taskRequest.getTaskTimeout()); |
| 194 | + log.error("process has failure due to timeout kill, timeout value is:{}, timeoutStrategy is:{}", |
| 195 | + taskRequest.getTaskTimeout(), taskRequest.getTaskTimeoutStrategy()); |
195 | 196 | result.setExitStatusCode(EXIT_CODE_FAILURE); |
196 | | - cancelApplication(); |
197 | 197 | } |
198 | 198 | int exitCode = this.process.exitValue(); |
199 | | - String exitLogMessage = EXIT_CODE_KILL == exitCode ? "process has killed." : "process has exited."; |
| 199 | + String exitLogMessage = (EXIT_CODE_KILL == exitCode || EXIT_CODE_HARD_KILL == exitCode) ? "process has killed." |
| 200 | + : "process has exited."; |
200 | 201 | log.info("{} execute path:{}, processId:{} ,exitStatusCode:{} ,processWaitForStatus:{} ,processExitValue:{}", |
201 | 202 | exitLogMessage, taskRequest.getExecutePath(), processId, result.getExitStatusCode(), status, exitCode); |
202 | 203 | return result; |
|
0 commit comments