Skip to content

Conversation

@sudiptob2
Copy link
Collaborator

@sudiptob2 sudiptob2 force-pushed the feat/157/min-zero-executor branch from 753bb02 to 8910d9b Compare January 5, 2026 20:27
val modeHelper = DeploymentModeHelper(conf)
val gangCardinality = modeHelper.getGangCardinality
configGenerator.getAnnotations ++ templateAnnotations ++ nodeUniformityLabel
.filter(_ => gangCardinality > 0) // Only add gang annotations if cardinality > 0
Copy link
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

  • Armada does not accept gangCardinality = 0; gives gang cardinality 0 is non-positive error

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Cardinality is driver + num(executors), so even if you submit driver only, cardinality will be 1 in that case.

Copy link
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Is it true for client mode as well? I guess for client mode, ExecutorCount is the gangCardinality

Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@sudiptob2 sudiptob2 marked this pull request as ready for review January 5, 2026 21:41
@sudiptob2 sudiptob2 requested a review from GeorgeJahad January 5, 2026 21:41
GeorgeJahad
GeorgeJahad previously approved these changes Jan 6, 2026
Copy link
Collaborator

@GeorgeJahad GeorgeJahad left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

lgtm, thanks @sudiptob2 !

if (executorCount <= 0) {
val modeHelper = DeploymentModeHelper(conf)
val executorCount = modeHelper.getExecutorCount
val isDynamic = conf.getBoolean("spark.dynamicAllocation.enabled", false)
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Is there a constant for this already defined somewhere in Spark? I'd ideally avoid magic strings

Copy link
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Hmm..I tried to look into this but it seems there is no predefined constant to avoid using magic strings for configuration keys. Also, this pattern of accessing configuration is already used in other places in the codebase.

@GeorgeJahad, any leads to improve this?

Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Copy link
Collaborator

@GeorgeJahad GeorgeJahad left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

lgtm, thanks @sudiptob2 !

Signed-off-by: Sudipto Baral <[email protected]>

# Conflicts:
#	src/main/scala/org/apache/spark/deploy/armada/submit/ArmadaClientApplication.scala
Signed-off-by: Sudipto Baral <[email protected]>
Signed-off-by: Sudipto Baral <[email protected]>
Signed-off-by: Sudipto Baral <[email protected]>
@sudiptob2 sudiptob2 force-pushed the feat/157/min-zero-executor branch from e8245c9 to 3b9fc3e Compare January 20, 2026 17:42
@sudiptob2 sudiptob2 merged commit 98ab408 into armadaproject:master Jan 20, 2026
12 checks passed
@sudiptob2 sudiptob2 deleted the feat/157/min-zero-executor branch January 20, 2026 18:50
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

allow dynamic allocation scaling to scale down to 0 executors

3 participants