Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
[SPARK-38379][K8S] Fix Kubernetes Client mode when mounting persisten…
…t volume with storage class ### What changes were proposed in this pull request? Running spark-shell in client mode on Kubernetes cluster when mounting persistent volumes with a storage class results in a big warning being thrown on startup. https://issues.apache.org/jira/browse/SPARK-38379 The issue here is there is a race condition between when spark.app.id is set in SparkContext and when its used, so change to use the KubernetesConf appId, which is what is used to set spark.app.id. ### Why are the changes needed? Throws big warning to user and I believe the label is wrong as well. ### Does this PR introduce _any_ user-facing change? No ### How was this patch tested? Unit test added. The test fails without the fix. Also manually tested on real k8s cluster. Closes apache#35792 from tgravescs/fixVolk8s. Authored-by: Thomas Graves <[email protected]> Signed-off-by: Dongjoon Hyun <[email protected]>
- Loading branch information