Skip to content

Commit e2b92b8

Browse files
pan3793HyukjinKwon
authored andcommitted
[SPARK-45670][CORE][3.5] SparkSubmit does not support --total-executor-cores when deploying on K8s
This is the cherry-pick of #43536 for branch-3.5 ### What changes were proposed in this pull request? Remove Kubernetes from the support list of `--total-executor-cores` in SparkSubmit ### Why are the changes needed? `--total-executor-cores` does not take effect in Spark on K8s, [the comments from original PR](#19717 (comment)) also proves that ### Does this PR introduce _any_ user-facing change? The output of `spark-submit --help` changed ```patch ... - Spark standalone, Mesos and Kubernetes only: + Spark standalone and Mesos only: --total-executor-cores NUM Total cores for all executors. ... ``` ### How was this patch tested? Pass GA and review. ### Was this patch authored or co-authored using generative AI tooling? No Closes #43550 from pan3793/SPARK-45670-3.5. Authored-by: Cheng Pan <[email protected]> Signed-off-by: Hyukjin Kwon <[email protected]>
1 parent 1b77c65 commit e2b92b8

File tree

2 files changed

+2
-2
lines changed

2 files changed

+2
-2
lines changed

core/src/main/scala/org/apache/spark/deploy/SparkSubmit.scala

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -683,7 +683,7 @@ private[spark] class SparkSubmit extends Logging {
683683
confKey = EXECUTOR_CORES.key),
684684
OptionAssigner(args.executorMemory, STANDALONE | MESOS | YARN | KUBERNETES, ALL_DEPLOY_MODES,
685685
confKey = EXECUTOR_MEMORY.key),
686-
OptionAssigner(args.totalExecutorCores, STANDALONE | MESOS | KUBERNETES, ALL_DEPLOY_MODES,
686+
OptionAssigner(args.totalExecutorCores, STANDALONE | MESOS, ALL_DEPLOY_MODES,
687687
confKey = CORES_MAX.key),
688688
OptionAssigner(args.files, LOCAL | STANDALONE | MESOS | KUBERNETES, ALL_DEPLOY_MODES,
689689
confKey = FILES.key),

core/src/main/scala/org/apache/spark/deploy/SparkSubmitArguments.scala

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -567,7 +567,7 @@ private[deploy] class SparkSubmitArguments(args: Seq[String], env: Map[String, S
567567
| --kill SUBMISSION_ID If given, kills the driver specified.
568568
| --status SUBMISSION_ID If given, requests the status of the driver specified.
569569
|
570-
| Spark standalone, Mesos and Kubernetes only:
570+
| Spark standalone and Mesos only:
571571
| --total-executor-cores NUM Total cores for all executors.
572572
|
573573
| Spark standalone, YARN and Kubernetes only:

0 commit comments

Comments
 (0)