Commit 0c7b430
[SPARK-43540][K8S][CORE] Add working directory into classpath on the driver in K8S cluster mode
### What changes were proposed in this pull request?
Adding working directory into classpath on the driver in K8S cluster mode.
### Why are the changes needed?
After #37417, the spark.files, spark.jars are placed in the working directory.
But seems that the spark context classloader can not access them because they are not in the classpath by default.
This pr adds the current working directory into classpath, so that the spark.files, spark.jars placed in the working directory can be accessible by the classloader.
For example, the `hive-site.xml` uploaded by `spark.files`.
### Does this PR introduce _any_ user-facing change?
yes, users do not need to add the working directory into spark classpath manually.
### How was this patch tested?
UT.
Closes #41201 from turboFei/work_dir_classpath.
Authored-by: fwang12 <[email protected]>
Signed-off-by: Dongjoon Hyun <[email protected]>1 parent 2057eb7 commit 0c7b430
File tree
3 files changed
+22
-5
lines changed- core/src
- main/scala/org/apache/spark/deploy
- test/scala/org/apache/spark/deploy
- resource-managers/kubernetes/docker/src/main/dockerfiles/spark
3 files changed
+22
-5
lines changedLines changed: 7 additions & 5 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
414 | 414 | | |
415 | 415 | | |
416 | 416 | | |
| 417 | + | |
| 418 | + | |
| 419 | + | |
417 | 420 | | |
418 | 421 | | |
419 | 422 | | |
| |||
423 | 426 | | |
424 | 427 | | |
425 | 428 | | |
426 | | - | |
| 429 | + | |
427 | 430 | | |
428 | | - | |
| 431 | + | |
429 | 432 | | |
430 | | - | |
431 | | - | |
432 | | - | |
| 433 | + | |
| 434 | + | |
433 | 435 | | |
434 | 436 | | |
435 | 437 | | |
| |||
Lines changed: 12 additions & 0 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
1618 | 1618 | | |
1619 | 1619 | | |
1620 | 1620 | | |
| 1621 | + | |
| 1622 | + | |
| 1623 | + | |
| 1624 | + | |
| 1625 | + | |
| 1626 | + | |
| 1627 | + | |
| 1628 | + | |
| 1629 | + | |
| 1630 | + | |
| 1631 | + | |
| 1632 | + | |
1621 | 1633 | | |
1622 | 1634 | | |
1623 | 1635 | | |
| |||
Lines changed: 3 additions & 0 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
75 | 75 | | |
76 | 76 | | |
77 | 77 | | |
| 78 | + | |
| 79 | + | |
| 80 | + | |
78 | 81 | | |
79 | 82 | | |
80 | 83 | | |
| |||
0 commit comments