You are viewing a plain text version of this content. The canonical link for it is here.
Posted to reviews@spark.apache.org by GitBox <gi...@apache.org> on 2021/02/04 10:04:34 UTC

[GitHub] [spark] LuciferYang commented on a change in pull request #31471: [SPARK-34355][SQL] Add log and time cost for commit job

LuciferYang commented on a change in pull request #31471:
URL: https://github.com/apache/spark/pull/31471#discussion_r570096278



##########
File path: sql/core/src/main/scala/org/apache/spark/sql/execution/datasources/FileFormatWriter.scala
##########
@@ -217,8 +217,11 @@ object FileFormatWriter extends Logging {
 
       val commitMsgs = ret.map(_.commitMsg)
 
+      val commitJobStartTime = System.nanoTime()
+      logInfo(s"Start to commit write Job ${description.uuid}.")
       committer.commitJob(job, commitMsgs)
-      logInfo(s"Write Job ${description.uuid} committed.")
+      logInfo(s"Write Job ${description.uuid} committed. " +
+        s"Cost time: ${(System.nanoTime() - commitJobStartTime) / 1000 / 1000} ms")

Review comment:
       Maybe should assign `System.nanoTime()` to a `val commitJobEndTime` first, otherwise the `Cost time` may not be accurate.




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

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



---------------------------------------------------------------------
To unsubscribe, e-mail: reviews-unsubscribe@spark.apache.org
For additional commands, e-mail: reviews-help@spark.apache.org