Commit e07a9b2
committed
[SPARK-59296][CORE][FOLLOWUP] Address review: bind local credential callback to this SparkEnv and document the driver-side early-startup window
Addresses review feedback on the local-mode parity change:
- LocalSchedulerBackend.setupUserCredentialManager now captures this backend's SparkEnv once and
uses it in both the propagation callback and the initial credential store, instead of looking up
the global SparkEnv.get on every callback. stop() only waits a bounded time for the renewal
thread, so a renewal that outlives this SparkContext could otherwise write this application's
credentials into a different SparkContext's store created later in the same JVM (notebook, test,
or Spark Connect session), where the restarted version counter would then reject the new
application's own renewals. Binding to this env confines a late renewal to this (stopped)
application's store.
- Correct the applyProviderProperties scaladoc: running the selection phase in local mode extends
the same driver-side early-startup window that already exists in cluster mode. Provider wiring is
applied during SparkContext construction but credentials are not resolved until scheduler-backend
start, so driver-side access to a wired scheme during construction (spark.jars / spark.files /
spark.archives / spark.checkpoint.dir on e.g. s3a://) runs before credentials exist. The earlier
wording ("points at credentials that are actually populated") was inaccurate for this window. The
OIDC security docs (separate docs PR) document this for local mode alongside cluster mode.
This keeps credential resolution late (parity with HadoopDelegationTokenManager and with cluster
mode); moving resolution earlier in local mode only would diverge local from cluster and break that
design intent, so the window is documented rather than closed.1 parent f3d9b5a commit e07a9b2
2 files changed
Lines changed: 20 additions & 7 deletions
File tree
- core/src/main/scala/org/apache/spark
- deploy/security
- scheduler/local
Lines changed: 10 additions & 4 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
541 | 541 | | |
542 | 542 | | |
543 | 543 | | |
544 | | - | |
545 | | - | |
546 | | - | |
547 | | - | |
| 544 | + | |
| 545 | + | |
| 546 | + | |
| 547 | + | |
| 548 | + | |
| 549 | + | |
| 550 | + | |
| 551 | + | |
| 552 | + | |
| 553 | + | |
548 | 554 | | |
549 | 555 | | |
550 | 556 | | |
| |||
Lines changed: 10 additions & 3 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
155 | 155 | | |
156 | 156 | | |
157 | 157 | | |
| 158 | + | |
| 159 | + | |
| 160 | + | |
| 161 | + | |
| 162 | + | |
| 163 | + | |
| 164 | + | |
| 165 | + | |
158 | 166 | | |
159 | 167 | | |
160 | 168 | | |
161 | 169 | | |
162 | 170 | | |
163 | 171 | | |
164 | 172 | | |
165 | | - | |
| 173 | + | |
166 | 174 | | |
167 | 175 | | |
168 | 176 | | |
169 | 177 | | |
170 | 178 | | |
171 | 179 | | |
172 | | - | |
173 | | - | |
| 180 | + | |
174 | 181 | | |
175 | 182 | | |
176 | 183 | | |
| |||
0 commit comments