Commit 1a662e8
[SPARK-49300][CORE][3.5] Fix Hadoop delegation token leak when tokenRenewalInterval is not set (apache#552)
Backport from master.
### What changes were proposed in this pull request?
Cancel delegation token once they are used in `getTokenRenewalInterval`
### Why are the changes needed?
When `tokenRenewalInterval` is not set, HadoopFSDelegationTokenProvider#getTokenRenewalInterval will fetch some tokens and renew them to get a interval value.
https://github.com/apache/spark/blob/dd259b0b27841e6dd7c07f8ca3cc05d275863dd5/core/src/main/scala/org/apache/spark/deploy/security/HadoopFSDelegationTokenProvider.scala#L60-L64
These tokens do not call cancel(), resulting in a large number of existing tokens on HDFS not being cleared in a timely manner, causing additional pressure on the HDFS server.
### Does this PR introduce _any_ user-facing change?
no
### How was this patch tested?
manual test
### Was this patch authored or co-authored using generative AI tooling?
no
Closes apache#47823 from zhangshuyan0/branch-3.5-zsy.
Authored-by: zhangshuyan <zhangshuyan@apache.org>
Signed-off-by: Chao Sun <chao@openai.com>
Co-authored-by: zhangshuyan <zhangshuyan@apache.org>1 parent b1a62c6 commit 1a662e8
File tree
1 file changed
+3
-0
lines changed- core/src/main/scala/org/apache/spark/deploy/security
1 file changed
+3
-0
lines changedLines changed: 3 additions & 0 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
146 | 146 | | |
147 | 147 | | |
148 | 148 | | |
| 149 | + | |
| 150 | + | |
| 151 | + | |
149 | 152 | | |
150 | 153 | | |
151 | 154 | | |
| |||
0 commit comments