liviazhu commented on code in PR #53101:
URL: https://github.com/apache/spark/pull/53101#discussion_r2539274055
##########
sql/core/src/main/scala/org/apache/spark/sql/execution/streaming/state/RocksDBStateMachine.scala:
##########
@@ -172,6 +172,16 @@ class RocksDBStateMachine(
}
}
+ // Return the task ID from the active TaskContext if exists for logging
purposes
+ private def taskID: String = {
+ val taskContext = TaskContext.get()
+ if (taskContext != null) {
+ taskContext.taskAttemptId().toString
+ } else {
+ "N/A"
Review Comment:
Made the change to return "undefined" as this is just used for logging
purposes so returning an option seems unnecessary and create more duplicate
code for the caller.
--
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]