Skip to content

[SPARK-58438][CORE] Close FileSystem cache after token renewal - #58110

Open
MrHappyEnding wants to merge 1 commit into
apache:masterfrom
MrHappyEnding:SPARK-58438
Open

[SPARK-58438][CORE] Close FileSystem cache after token renewal#58110
MrHappyEnding wants to merge 1 commit into
apache:masterfrom
MrHappyEnding:SPARK-58438

Conversation

@MrHappyEnding

Copy link
Copy Markdown
Contributor

What changes were proposed in this pull request?

Close FileSystem instances cached for the fresh Hadoop UGI after obtaining delegation tokens. The cleanup is shared by both one-time token acquisition and scheduled renewal, and runs in a finally block.

A regression test was added to verify that FileSystem instances created during renewal are closed.

Why are the changes needed?

Each renewal creates a fresh UGI. FileSystem instances cached for that UGI were not closed by the renewal path, causing the Hadoop FileSystem cache to grow after every renewal.

Does this PR introduce any user-facing change?

No.

How was this patch tested?

Ran:

build/sbt 'core/testOnly *HadoopDelegationTokenManagerSuite -- -z "SPARK-58438"'
build/sbt 'core/testOnly *HadoopDelegationTokenManagerSuite'
dev/lint-scala

Was this patch authored or co-authored using generative AI tooling?

Generated-by: Codex

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant