gengliangwang commented on code in PR #46724:
URL: https://github.com/apache/spark/pull/46724#discussion_r1617726611


##########
core/src/main/scala/org/apache/spark/internal/io/SparkHadoopWriter.scala:
##########
@@ -98,10 +98,11 @@ object SparkHadoopWriter extends Logging {
           iterator = iter)
       })
 
-      logInfo(s"Start to commit write Job ${jobContext.getJobID}.")
+      logInfo(log"Start to commit write Job ${MDC(JOB_ID, 
jobContext.getJobID)}.")
       val (_, duration) = Utils
         .timeTakenMs { committer.commitJob(jobContext, 
ret.toImmutableArraySeq) }
-      logInfo(s"Write Job ${jobContext.getJobID} committed. Elapsed time: 
$duration ms.")
+      logInfo(log"Write Job ${MDC(JOB_ID, jobContext.getJobID)} committed." +
+        log" Elapsed time: ${MDC(TOTAL_TIME, duration)} ms.")

Review Comment:
   `DURATION`, or we can just merge `DURATION` and `TOTAL_TIME`



-- 
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]


---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]

Reply via email to