Skip to content

Commit 5364392

Browse files
pan3793dongjoon-hyun
authored andcommitted
[SPARK-45670][CORE] SparkSubmit does not support --total-executor-cores when deploying on K8s
### 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 and Kubernetes only: + Spark standalone 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 #43536 from pan3793/tec. Authored-by: Cheng Pan <[email protected]> Signed-off-by: Dongjoon Hyun <[email protected]>
1 parent 8c11804 commit 5364392

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
@@ -674,7 +674,7 @@ private[spark] class SparkSubmit extends Logging {
674674
confKey = EXECUTOR_CORES.key),
675675
OptionAssigner(args.executorMemory, STANDALONE | YARN | KUBERNETES, ALL_DEPLOY_MODES,
676676
confKey = EXECUTOR_MEMORY.key),
677-
OptionAssigner(args.totalExecutorCores, STANDALONE | KUBERNETES, ALL_DEPLOY_MODES,
677+
OptionAssigner(args.totalExecutorCores, STANDALONE, ALL_DEPLOY_MODES,
678678
confKey = CORES_MAX.key),
679679
OptionAssigner(args.files, LOCAL | STANDALONE | KUBERNETES, ALL_DEPLOY_MODES,
680680
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
@@ -566,7 +566,7 @@ private[deploy] class SparkSubmitArguments(args: Seq[String], env: Map[String, S
566566
| --kill SUBMISSION_ID If given, kills the driver specified.
567567
| --status SUBMISSION_ID If given, requests the status of the driver specified.
568568
|
569-
| Spark standalone and Kubernetes only:
569+
| Spark standalone only:
570570
| --total-executor-cores NUM Total cores for all executors.
571571
|
572572
| Spark standalone, YARN and Kubernetes only:

0 commit comments

Comments
 (0)