Nishanth28 commented on code in PR #52931:
URL: https://github.com/apache/spark/pull/52931#discussion_r2549313610


##########
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:
   Sure @ueshin  I have formatted the log using MDC



##########
core/src/main/scala/org/apache/spark/api/python/PythonRunner.scala:
##########
@@ -811,16 +835,13 @@ private[spark] abstract class BasePythonRunner[IN, OUT](
               pythonWorkerStatusMessageWithContext(handle, worker, hasInput || 
buffer.hasRemaining))
           } else {
             logWarning(
-              log"Idle timeout reached for Python worker (timeout: " +
-              log"${MDC(LogKeys.PYTHON_WORKER_IDLE_TIMEOUT, 
idleTimeoutSeconds)} seconds). " +
-              log"No data received from the worker process: " +
-              pythonWorkerStatusMessageWithContext(handle, worker, hasInput || 
buffer.hasRemaining))
+              s"Idle timeout reached for Python worker (timeout: 
$idleTimeoutSeconds seconds). " +
+              s"No data received from the worker process - 
${taskIdentifier(context)}")

Review Comment:
   Sure @ueshin I have formatted the log using MDC



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