ueshin commented on code in PR #52931:
URL: https://github.com/apache/spark/pull/52931#discussion_r2539704791
##########
core/src/main/scala/org/apache/spark/api/python/PythonRunner.scala:
##########
@@ -620,10 +636,18 @@ private[spark] abstract class BasePythonRunner[IN, OUT](
val init = initTime - bootTime
val finish = finishTime - initTime
val total = finishTime - startTime
- logInfo(log"Times: total = ${MDC(LogKeys.TOTAL_TIME, total)}, " +
- log"boot = ${MDC(LogKeys.BOOT_TIME, boot)}, " +
- log"init = ${MDC(LogKeys.INIT_TIME, init)}, " +
- log"finish = ${MDC(LogKeys.FINISH_TIME, finish)}")
+
+ // Format data size for readability
+ val dataKB = totalDataReceived / 1024.0
+ val dataMB = dataKB / 1024.0
+ val dataStr = if (dataMB >= 1.0) {
+ f"$dataMB%.2f MB"
+ } else {
+ f"$dataKB%.2f KB"
+ }
+
+ logInfo(s"Times: total = $total, boot = $boot, init = $init, finish =
$finish - " +
Review Comment:
We should use mdc + log?
--
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]