You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@dolphinscheduler.apache.org by GitBox <gi...@apache.org> on 2021/11/17 02:45:10 UTC

[GitHub] [dolphinscheduler] ruanwenjun commented on a change in pull request #6731: [Improvement][Log] optimize task log path to reduce task running time

ruanwenjun commented on a change in pull request #6731:
URL: https://github.com/apache/dolphinscheduler/pull/6731#discussion_r750840232



##########
File path: dolphinscheduler-common/src/main/java/org/apache/dolphinscheduler/common/utils/LoggerUtils.java
##########
@@ -71,12 +72,14 @@ private LoggerUtils() {
      * @return task id format
      */
     public static String buildTaskId(String affix,
+                                     Date firstSubmitTime,
                                      Long processDefineCode,
                                      int processDefineVersion,
                                      int processInstId,
                                      int taskId) {
-        // - [taskAppId=TASK-798_1-4084-15210]
-        return String.format(" - %s%s-%s_%s-%s-%s]", TASK_APPID_LOG_FORMAT, affix, processDefineCode, processDefineVersion, processInstId, taskId);
+        // - [taskAppId=TASK-20211107-798_1-4084-15210]
+        String firstSubmitTimeStr = DateUtils.format(firstSubmitTime, Constants.YYYYMMDD);
+        return String.format(" - %s%s-%s-%s_%s-%s-%s]", TASK_APPID_LOG_FORMAT, affix, firstSubmitTimeStr, processDefineCode, processDefineVersion, processInstId, taskId);

Review comment:
       LGTM, 
   but why not use all `-` here? Use `_` here is just want to split?




-- 
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: commits-unsubscribe@dolphinscheduler.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org