Github user vanzin commented on a diff in the pull request:
https://github.com/apache/spark/pull/14065#discussion_r72490919
--- Diff:
yarn/src/main/scala/org/apache/spark/deploy/yarn/security/CredentialUpdater.scala
---
@@ -41,16 +43,18 @@ private[spark] class ExecutorDelegationTokenUpdater(
SparkHadoopUtil.get.getConfBypassingFSCache(
hadoopConf, new Path(credentialsFile).toUri.getScheme)
- private val delegationTokenRenewer =
+ private val credentialUpdater =
Executors.newSingleThreadScheduledExecutor(
- ThreadUtils.namedThreadFactory("Delegation Token Refresh Thread"))
+ ThreadUtils.namedThreadFactory("Credential Refresh Thread"))
- // On the executor, this thread wakes up and picks up new tokens from
HDFS, if any.
- private val executorUpdaterRunnable =
+ // This thread wakes up and picks up new credentials from HDFS, if any.
+ private val credentialUpdaterRunnable =
new Runnable {
override def run(): Unit =
Utils.logUncaughtExceptions(updateCredentialsIfRequired())
}
+ @volatile private var timeOfNextUpdate =
sparkConf.get(CREDENTIALS_UPDATE_TIME)
--- End diff --
This is only ever used inside `updateCredentialsIfRequired`, do you need to
keep it in a field?
---
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]