sarutak commented on code in PR #57675:
URL: https://github.com/apache/spark/pull/57675#discussion_r3710455088
##########
core/src/main/scala/org/apache/spark/scheduler/cluster/CoarseGrainedSchedulerBackend.scala:
##########
@@ -1047,6 +1061,46 @@ class CoarseGrainedSchedulerBackend(scheduler:
TaskSchedulerImpl, val rpcEnv: Rp
protected def currentDelegationTokens: Array[Byte] = delegationTokens.get()
+ /**
+ * Update user credentials and broadcast to all registered executors.
+ * Called from the DriverEndpoint receive loop (thread-safe access to
executorDataMap).
+ */
+ private def updateUserCredentials(credentials: Array[Byte]): Unit = {
+ userCredentials.set(credentials)
+ // Also update driver's SparkEnv so TaskDescription can include current
credentials.
+ SparkEnv.get.userCredentials.set(credentials)
+ executorDataMap.values.foreach { ed =>
+ ed.executorEndpoint.send(UpdateUserCredentials(credentials))
+ }
+ }
+
+ protected def currentUserCredentials: Array[Byte] = userCredentials.get()
+
Review Comment:
It was added for symmetry with `currentDelegationTokens` but has no callers.
I'll remove it and add it back when a follow-up sub-task needs it.
--
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]