Github user mridulm commented on a diff in the pull request:
https://github.com/apache/spark/pull/14789#discussion_r87116199
--- Diff:
yarn/src/main/scala/org/apache/spark/scheduler/cluster/YarnSchedulerBackend.scala
---
@@ -189,6 +190,39 @@ private[spark] abstract class YarnSchedulerBackend(
}
/**
+ * Renew and update the credentials. This method will trigger
credentials renewal in the AM
+ * side, once successfully renewed, it will trigger credentials updating
in executor and
+ * driver side.
+ */
+ def updateCredentials(): Unit = {
+ yarnSchedulerEndpoint.amEndpoint match {
+ case Some(am) =>
+ val future = am.ask[Boolean](UpdateCredentials)
+
+ future.onSuccess {
+ case true =>
+ // Update credentials in the executor side only when AM is
successfully renewed the
+ // Credentials.
+ synchronized {
+
executorDataMap.values.foreach(_.executorEndpoint.send(UpdateCredentials))
+ }
+ // This will trigger credential updating in the driver side.
+ SparkHadoopUtil.get.triggerCredentialUpdater()
--- End diff --
Note that when we modify the above to return future, this will also need to
be in the future (or can always be done inline).
---
If your project is set up for it, you can reply to this email and have your
reply appear on GitHub as well. If your project does not have this feature
enabled and wishes so, or if the feature is enabled but not working, please
contact infrastructure at [email protected] or file a JIRA ticket
with INFRA.
---
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]