File tree Expand file tree Collapse file tree 1 file changed +3
-3
lines changed
yarn/src/main/scala/org/apache/spark/deploy/yarn Expand file tree Collapse file tree 1 file changed +3
-3
lines changed Original file line number Diff line number Diff line change @@ -131,6 +131,9 @@ private[spark] class ApplicationMaster(
131131 // a new AMDelegationTokenRenewer
132132 if (sparkConf.contains(" spark.yarn.credentials.file" )) {
133133 delegationTokenRenewerOption = Some (new AMDelegationTokenRenewer (sparkConf, yarnConf))
134+ // If a principal and keytab have been set, use that to create new credentials for executors
135+ // periodically
136+ delegationTokenRenewerOption.foreach(_.scheduleLoginFromKeytab())
134137 }
135138
136139 if (isClusterMode) {
@@ -272,9 +275,6 @@ private[spark] class ApplicationMaster(
272275 sc.getConf.get(" spark.driver.port" ),
273276 isClusterMode = true )
274277 registerAM(sc.ui.map(_.appUIAddress).getOrElse(" " ), securityMgr)
275- // If a principal and keytab have been set, use that to create new credentials for executors
276- // periodically
277- delegationTokenRenewerOption.foreach(_.scheduleLoginFromKeytab())
278278 userClassThread.join()
279279 }
280280 }
You can’t perform that action at this time.
0 commit comments