HyukjinKwon commented on code in PR #52931:
URL: https://github.com/apache/spark/pull/52931#discussion_r2524361656
##########
core/src/main/scala/org/apache/spark/api/python/PythonRunner.scala:
##########
@@ -134,6 +133,15 @@ private[spark] object BasePythonRunner extends Logging {
} else None
}
+ /**
+ * Creates a task identifier string for logging following Spark's standard
format.
+ * Format: "task <partition>.<attempt> in stage <stageId> (TID
<taskAttemptId>)"
+ */
+ private[spark] def taskIdentifier(context: TaskContext): String = {
+ s"task ${context.partitionId()}.${context.attemptNumber()} in stage
${context.stageId()} " +
Review Comment:
I think we can get the info in TaskContext in UDF execution, no?
##########
core/src/main/scala/org/apache/spark/api/python/PythonRunner.scala:
##########
@@ -134,6 +133,15 @@ private[spark] object BasePythonRunner extends Logging {
} else None
}
+ /**
+ * Creates a task identifier string for logging following Spark's standard
format.
+ * Format: "task <partition>.<attempt> in stage <stageId> (TID
<taskAttemptId>)"
+ */
+ private[spark] def taskIdentifier(context: TaskContext): String = {
+ s"task ${context.partitionId()}.${context.attemptNumber()} in stage
${context.stageId()} " +
Review Comment:
I think we can get the info in TaskContext in Python UDF execution, no?
--
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]