Github user jerryshao commented on a diff in the pull request:
https://github.com/apache/spark/pull/18616#discussion_r127778711
--- Diff:
resource-managers/yarn/src/main/scala/org/apache/spark/deploy/yarn/ApplicationMaster.scala
---
@@ -438,6 +441,24 @@ private[spark] class ApplicationMaster(
registerAM(sparkConf, rpcEnv, driverRef,
sparkConf.getOption("spark.driver.appUIAddress"),
securityMgr)
+ // If the credentials file config is present, we must periodically
renew tokens. So create
+ // a new AMDelegationTokenRenewer
+ if (sparkConf.contains(CREDENTIALS_FILE_PATH)) {
+ // Start a short-lived thread for AMCredentialRenewer, the only
purpose is to set the
+ // classloader so that main jar and secondary jars could be used by
AMCredentialRenewer.
+ val credentialRenewerThread = new Thread {
+ setName("AMCredentialRenewerStarter")
+ setContextClassLoader(userClassLoader)
+
+ override def run(): Unit = {
+ startAMCredentialRenewer()
+ }
+ }
+
+ credentialRenewerThread.start()
+ credentialRenewerThread.join()
--- End diff --
Sure, I will change the code.
---
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]