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 5627331  [Bug][Master] remove check with executePath when kill yarn 
job (#5552)
5627331 is described below

commit 56273319a21d8f1af3c7693a2c577ffb1d8c17d3
Author: geosmart <[email protected]>
AuthorDate: Sat May 29 12:14:46 2021 +0800

    [Bug][Master] remove check with executePath when kill yarn job (#5552)
    
    * [Bug][Master] remove check with executePath when kill yarn job
    
    * [Bug][Master] init execute path if not exist
    
    * [Bug][Master] move createWorkDirIfAbsent out side of executePath 
calculate  part
    
    Co-authored-by: wanggang <[email protected]>
---
 .../apache/dolphinscheduler/server/utils/ProcessUtils.java  | 13 ++++++++-----
 1 file changed, 8 insertions(+), 5 deletions(-)

diff --git 
a/dolphinscheduler-server/src/main/java/org/apache/dolphinscheduler/server/utils/ProcessUtils.java
 
b/dolphinscheduler-server/src/main/java/org/apache/dolphinscheduler/server/utils/ProcessUtils.java
index d37ebbc..4d2ace6 100644
--- 
a/dolphinscheduler-server/src/main/java/org/apache/dolphinscheduler/server/utils/ProcessUtils.java
+++ 
b/dolphinscheduler-server/src/main/java/org/apache/dolphinscheduler/server/utils/ProcessUtils.java
@@ -449,12 +449,15 @@ public class ProcessUtils {
                         taskExecutionContext.getLogPath());
             }
             if (StringUtils.isNotEmpty(log)) {
-                List<String> appIds = LoggerUtils.getAppIds(log, logger);
-                String workerDir = taskExecutionContext.getExecutePath();
-                if (StringUtils.isEmpty(workerDir)) {
-                    logger.error("task instance work dir is empty");
-                    throw new RuntimeException("task instance work dir is 
empty");
+                if 
(StringUtils.isEmpty(taskExecutionContext.getExecutePath())) {
+                    
taskExecutionContext.setExecutePath(FileUtils.getProcessExecDir(taskExecutionContext.getProjectCode(),
+                            taskExecutionContext.getProcessDefineCode(),
+                            taskExecutionContext.getProcessDefineVersion(),
+                            taskExecutionContext.getProcessInstanceId(),
+                            taskExecutionContext.getTaskInstanceId()));
                 }
+                
FileUtils.createWorkDirIfAbsent(taskExecutionContext.getExecutePath());
+                List<String> appIds = LoggerUtils.getAppIds(log, logger);
                 if (CollectionUtils.isNotEmpty(appIds)) {
                     cancelApplication(appIds, logger, 
taskExecutionContext.getTenantCode(), taskExecutionContext.getExecutePath());
                     return appIds;

Reply via email to