ruanwenjun commented on code in PR #11206:
URL: https://github.com/apache/dolphinscheduler/pull/11206#discussion_r933344189


##########
dolphinscheduler-task-plugin/dolphinscheduler-task-api/src/main/java/org/apache/dolphinscheduler/plugin/task/api/TaskExecutionContext.java:
##########
@@ -218,7 +218,8 @@ public class TaskExecutionContext implements Serializable {
     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}

Review Comment:
   Why did we need to add `TaskAppId=` in the prefix? 
   ```java
   public static String buildTaskId(Date firstSubmitTime,
                                        Long processDefineCode,
                                        int processDefineVersion,
                                        int processInstId,
                                        int taskId) {
           // like TaskAppId=TASK-20211107-798_1-4084-15210
           String firstSubmitTimeStr = DateUtils.format(firstSubmitTime, 
Constants.YYYYMMDD, null);
           return String.format("%s=%s-%s-%s_%s-%s-%s",
                   TaskConstants.TASK_APPID_LOG_FORMAT, 
TaskConstants.TASK_LOGGER_INFO_PREFIX, firstSubmitTimeStr, processDefineCode, 
processDefineVersion, processInstId, taskId);
       }
   ```
   I think the 
`TASK-{firstSubmitTime}-{processDefineCode}_{processDefineVersion}-{processInstanceId}-{taskInstanceId}`
 is enough
   cc @caishunfeng 
   



-- 
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: [email protected]

For queries about this service, please contact Infrastructure at:
[email protected]

Reply via email to