Skip to content

[LIVY-1059] Fix missing validation condition and add unit test#531

Merged
gyogal merged 1 commit into
apache:masterfrom
nileshrathi345:master_LIVY-1059
Jul 9, 2026
Merged

[LIVY-1059] Fix missing validation condition and add unit test#531
gyogal merged 1 commit into
apache:masterfrom
nileshrathi345:master_LIVY-1059

Conversation

@nileshrathi345

Copy link
Copy Markdown
Contributor

What changes were proposed in this pull request?

This is a follow-up fix for LIVY-1059.

When a client sends "queue": "" in the session create JSON, Livy was treating it as a valid queue value instead of falling back to the server default livy.spark.yarn.queue.

This change treats an empty queue string the same as a missing queue, so the default YARN queue from Livy config is used when the client passes "".

Updated in both batch and interactive session creation:
request.queue.filterNot(_.isEmpty).orElse(livyConf.sparkYarnQueue())

How was this patch tested?

  • Added unit test in BatchSessionSpec for queue = Some("") and verified the default queue is passed to spark-submit
  • Added unit test in InteractiveSessionSpec for queue = Some("") and verified the session uses the default queue from LivyConf
  • Existing tests for queue = None and user-provided queue values still pass

@gyogal gyogal left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

LGTM, thanks for fixing this, @nileshrathi345 !

@gyogal gyogal merged commit 228b889 into apache:master Jul 9, 2026
4 checks passed
@nileshrathi345 nileshrathi345 deleted the master_LIVY-1059 branch July 10, 2026 03:40
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.

2 participants