[LIVY-1061] Add livy.server.app-name-prefix for interactive session YARN app names - #534
Merged
Merged
Conversation
Contributor
Author
|
@roczei , @gyogal , @nileshrathi345 and @ArnavBalyan |
Codecov Report✅ All modified and coverable lines are covered by tests. Additional details and impacted files@@ Coverage Diff @@
## master #534 +/- ##
============================================
+ Coverage 68.38% 68.63% +0.25%
- Complexity 1199 1215 +16
============================================
Files 106 106
Lines 6711 6785 +74
Branches 831 834 +3
============================================
+ Hits 4589 4657 +68
- Misses 1657 1660 +3
- Partials 465 468 +3 ☔ View full report in Codecov by Harness. 🚀 New features to boost your workflow:
|
roczei
approved these changes
Jul 28, 2026
roczei
left a comment
Contributor
There was a problem hiding this comment.
Thanks for this! Nice, focused change with good tests and docs. LGTM
gyogal
approved these changes
Jul 28, 2026
gyogal
left a comment
Contributor
There was a problem hiding this comment.
LGTM, thank you for your contribution @samuhasavak5 !
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
What changes were proposed in this pull request?
This PR adds a new Livy server configuration property, livy.server.app-name-prefix, to allow cluster administrators to customize the default YARN application name for interactive Spark sessions.
Problem: When a client creates an interactive session via POST /sessions without specifying a name, Livy sets spark.app.name to the hardcoded value livy-session-. In HA or multi-cluster environments, this makes it difficult to distinguish Livy-managed applications in the YARN Resource Manager UI.
Solution:
Add LivyConf.SERVER_APP_NAME_PREFIX (livy.server.app-name-prefix, default: livy-session)
Use the configured prefix when building the default spark.app.name in InteractiveSession.create()
Document the new property in conf/livy.conf.template
Add unit tests for default and custom prefix behavior
Scope: Interactive sessions only. Batch sessions already support per-request naming via the REST API name field and are unchanged.
Backward compatibility: When the property is unset, behavior remains livy-session-.
Example:
livy.conf
Creating a session without a name yields YARN application name: my-cluster-3
JIRA: LIVY-1061
How was this patch tested?
-Default prefix (livy-session) when config is not set
-Custom prefix (e.g. my-cluster) when livy.server.app-name-prefix is configured
No UI changes in this PR.
Was this patch authored or co-authored using generative AI tooling?
Yes, this was co-authored using Cursor to help generate the new test cases.