Browse Source

fix error (#11206)

(cherry picked from commit bfff3a7c5d)
3.0.0/version-upgrade
xuhhui 2 years ago committed by Jiajie Zhong
parent
commit
d550f9917e
  1. 3
      dolphinscheduler-task-plugin/dolphinscheduler-task-api/src/main/java/org/apache/dolphinscheduler/plugin/task/api/TaskExecutionContext.java
  2. 6
      dolphinscheduler-worker/src/main/java/org/apache/dolphinscheduler/server/worker/runner/TaskExecuteThread.java

3
dolphinscheduler-task-plugin/dolphinscheduler-task-api/src/main/java/org/apache/dolphinscheduler/plugin/task/api/TaskExecutionContext.java

@ -213,7 +213,8 @@ public class TaskExecutionContext implements Serializable {
private ExecutionStatus currentExecutionStatus; private ExecutionStatus currentExecutionStatus;
/** /**
* Task Logger name should be like: Task-{processDefinitionId}-{processInstanceId}-{taskInstanceId} * Task Logger name should be like:
* TaskAppId=TASK-{firstSubmitTime}-{processDefineCode}_{processDefineVersion}-{processInstanceId}-{taskInstanceId}
*/ */
private String taskLogName; private String taskLogName;

6
dolphinscheduler-worker/src/main/java/org/apache/dolphinscheduler/server/worker/runner/TaskExecuteThread.java

@ -317,9 +317,9 @@ public class TaskExecuteThread implements Runnable, Delayed {
// query the tenant code of the resource according to the name of the resource // query the tenant code of the resource according to the name of the resource
String fullName = fileDownload.getLeft(); String fullName = fileDownload.getLeft();
String tenantCode = fileDownload.getRight(); String tenantCode = fileDownload.getRight();
String resHdfsPath = storageOperate.getResourceFileName(tenantCode, fullName); String resPath = storageOperate.getResourceFileName(tenantCode, fullName);
logger.info("get resource file from hdfs :{}", resHdfsPath); logger.info("get resource file from path:{}", resPath);
storageOperate.download(tenantCode, resHdfsPath, execLocalPath + File.separator + fullName, false, true); storageOperate.download(tenantCode, resPath, execLocalPath + File.separator + fullName, false, true);
} catch (Exception e) { } catch (Exception e) {
logger.error(e.getMessage(), e); logger.error(e.getMessage(), e);
throw new ServiceException(e.getMessage()); throw new ServiceException(e.getMessage());

Loading…
Cancel
Save