Skip to content

[LIVY-1059] Add livy.spark.yarn.queue configuration to set default YARN queue#529

Merged
gyogal merged 1 commit into
apache:masterfrom
nileshrathi345:master-LIVY1059
Jul 6, 2026
Merged

[LIVY-1059] Add livy.spark.yarn.queue configuration to set default YARN queue#529
gyogal merged 1 commit into
apache:masterfrom
nileshrathi345:master-LIVY1059

Conversation

@nileshrathi345

@nileshrathi345 nileshrathi345 commented Jun 23, 2026

Copy link
Copy Markdown
Contributor

What changes were proposed in this pull request?

This PR introduces support for configuring a default YARN queue at the Livy server level via a new configuration property: livy.spark.yarn.queue.

Previously, if a client did not explicitly specify a YARN queue parameter (queue) in their session creation payload, the session would fall back to the global Hadoop cluster's default YARN queue. This change allows cluster administrators to isolate Livy-generated workloads into a specific default queue without requiring end-users to pass it manually in every API request.

When a client provides queue in the session creation request, that value takes priority over the server default.

How was this patch tested?

  • Added unit tests in BatchSessionSpec that verify --queue is passed to spark-submit when using the LivyConf default or a user-provided queue
  • Added unit tests in InteractiveSessionSpec that verify the resolved queue is stored on the session
  • Manual API validation against a YARN cluster

@nileshrathi345

Copy link
Copy Markdown
Contributor Author

@ArnavBalyan, @gyogal and @roczei could you please take a look when possible thanks!

@ArnavBalyan ArnavBalyan left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

Thanks for the changes @nileshrathi345, could you pls look into the CI failures, overall LGTM

Comment thread server/src/main/scala/org/apache/livy/LivyConf.scala Outdated
Comment thread server/src/main/scala/org/apache/livy/server/batch/BatchSession.scala Outdated
Comment thread server/src/main/scala/org/apache/livy/server/batch/BatchSessionServlet.scala Outdated

@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.

Thanks for submitting a PR @nileshrathi345 ! I left two minor comments, could you please check and let me know your thoughts?

@nileshrathi345 nileshrathi345 requested a review from gyogal June 25, 2026 06:18
Comment thread server/src/main/scala/org/apache/livy/server/batch/BatchSession.scala Outdated
@nileshrathi345 nileshrathi345 requested a review from gyogal July 3, 2026 12:34

@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, thank you for updating your PR @nileshrathi345 !

@gyogal gyogal merged commit 1aa25ed into apache:master Jul 6, 2026
4 checks passed
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.

3 participants