Github user jerryshao commented on a diff in the pull request: https://github.com/apache/spark/pull/14065#discussion_r72749483 --- 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 method `updateCredentialsIfRequired ` will periodically call itself, so it is easy to code to put it as 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 infrastruct...@apache.org or file a JIRA ticket with INFRA. --- --------------------------------------------------------------------- To unsubscribe, e-mail: reviews-unsubscr...@spark.apache.org For additional commands, e-mail: reviews-h...@spark.apache.org