[SPARK-59124][CORE][K8S] Support spark.kubernetes.files.avoidDownloadSchemes for K8s Cluster Mode - #58423
Open
WonYong-Jang wants to merge 1 commit into
Open
Conversation
spark.kubernetes.files.avoidDownloadSchemes for K8s cluster mode
spark.kubernetes.files.avoidDownloadSchemes for K8s cluster modespark.kubernetes.files.avoidDownloadSchemes for K8s Cluster Mode
WonYong-Jang
marked this pull request as ready for review
August 31, 2026 03:37
WonYong-Jang
force-pushed
the
spark-files-avoid-download
branch
from
August 31, 2026 03:49
d79819d to
a7f43ce
Compare
…Schemes for K8s cluster mode
WonYong-Jang
force-pushed
the
spark-files-avoid-download
branch
from
August 31, 2026 03:50
a7f43ce to
7378ef2
Compare
Author
|
@dongjoon-hyun |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
What changes were proposed in this pull request?
Add a new config
spark.kubernetes.files.avoidDownloadSchemesthat extends the existing avoidDownload mechanism (SPARK-47475, for jars) tospark.filesin Kubernetes cluster mode. When a file's scheme matches (or *), its remote URI is preserved instead of being downloaded to the driver's local disk. This mirrors the jars handling.Why are the changes needed?
In K8s cluster mode,
SparkSubmitalways downloadsspark.filesto the driver and rewrites URIs to file:/tmp/..., discarding the original remote URI (e.g. s3a://). As a resultspark.read.*cannot resolve the file on executors, and all files funnel through the driver's file server, saturating its network at high executor counts. Jars already avoid this; files should have the same option.Does this PR introduce any user-facing change?
Yes - a new opt-in config
spark.kubernetes.files.avoidDownloadSchemes(default: none)No behavior change unless set.
How was this patch tested?
New SparkSubmitSuite tests covering scheme-match(s3a), wildcard (*), and non-match(hdfs) cases.
Was this patch authored or co-authored using generative AI tooling?
Generated-by: Claude Code (Claude Opus 4.8)
Closes #58310