Skip to content

Commit 4d8ace4

Browse files
Kalvin Chausrowen
authored andcommitted
[SPARK-22583] First delegation token renewal time is not 75% of renewal time in Mesos
The first scheduled renewal time is is set to the exact expiration time, and all subsequent renewal times are 75% of the renewal time. This makes it so that the inital renewal time is also 75%. ## What changes were proposed in this pull request? Set the initial renewal time to be 75% of renewal time. ## How was this patch tested? Tested locally in a test HDFS cluster, checking various renewal times. Author: Kalvin Chau <[email protected]> Closes #19798 from kalvinnchau/fix-inital-renewal-time.
1 parent e3fd93f commit 4d8ace4

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

resource-managers/mesos/src/main/scala/org/apache/spark/scheduler/cluster/mesos/MesosHadoopDelegationTokenManager.scala

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -63,7 +63,7 @@ private[spark] class MesosHadoopDelegationTokenManager(
6363
val hadoopConf = SparkHadoopUtil.get.newConfiguration(conf)
6464
val rt = tokenManager.obtainDelegationTokens(hadoopConf, creds)
6565
logInfo(s"Initialized tokens: ${SparkHadoopUtil.get.dumpTokens(creds)}")
66-
(SparkHadoopUtil.get.serialize(creds), rt)
66+
(SparkHadoopUtil.get.serialize(creds), SparkHadoopUtil.getDateOfNextUpdate(rt, 0.75))
6767
} catch {
6868
case e: Exception =>
6969
logError(s"Failed to fetch Hadoop delegation tokens $e")

0 commit comments

Comments
 (0)