Skip to content
Snippets Groups Projects
Commit 7363dde6 authored by Kent Yao's avatar Kent Yao Committed by Marcelo Vanzin
Browse files

[SPARK-19626][YARN] Using the correct config to set credentials update time

## What changes were proposed in this pull request?

In https://github.com/apache/spark/pull/14065, we introduced a configurable credential manager for Spark running on YARN. Also two configs `spark.yarn.credentials.renewalTime` and `spark.yarn.credentials.updateTime` were added, one is for the credential renewer and the other updater. But now we just query `spark.yarn.credentials.renewalTime` by mistake during CREDENTIALS UPDATING, where should be actually `spark.yarn.credentials.updateTime` .

This PR fixes this mistake.

## How was this patch tested?

existing test

cc jerryshao vanzin

Author: Kent Yao <yaooqinn@hotmail.com>

Closes #16955 from yaooqinn/cred_update.
parent 280afe0e
No related branches found
No related tags found
No related merge requests found
......@@ -55,7 +55,7 @@ private[spark] class CredentialUpdater(
/** Start the credential updater task */
def start(): Unit = {
val startTime = sparkConf.get(CREDENTIALS_RENEWAL_TIME)
val startTime = sparkConf.get(CREDENTIALS_UPDATE_TIME)
val remainingTime = startTime - System.currentTimeMillis()
if (remainingTime <= 0) {
credentialUpdater.schedule(credentialUpdaterRunnable, 1, TimeUnit.MINUTES)
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment