-
Notifications
You must be signed in to change notification settings - Fork 625
[LIVY-1059] Add livy.spark.yarn.queue configuration to set default YARN queue #529
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
base: master
Are you sure you want to change the base?
Changes from all commits
25ab8f5
e142eef
ba7b01a
833b84d
4102fa2
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
| Original file line number | Diff line number | Diff line change |
|---|---|---|
|
|
@@ -83,7 +83,7 @@ object BatchSession extends Logging { | |
| request.executorMemory.foreach(builder.executorMemory) | ||
| request.executorCores.foreach(builder.executorCores) | ||
| request.numExecutors.foreach(builder.numExecutors) | ||
| request.queue.foreach(builder.queue) | ||
| request.queue.orElse(livyConf.getYarnQueue()).foreach(builder.queue) | ||
| request.name.foreach(builder.name) | ||
|
|
||
| sessionStore.save(BatchSession.RECOVERY_SESSION_TYPE, s.recoveryMetadata) | ||
|
|
@@ -120,6 +120,7 @@ object BatchSession extends Logging { | |
| owner, | ||
| impersonatedUser, | ||
| sessionStore, | ||
| request.queue.orElse(livyConf.getYarnQueue()), | ||
| mockApp.map { m => (_: BatchSession) => m }.getOrElse(createSparkApp)) | ||
| } | ||
|
|
||
|
|
@@ -137,6 +138,7 @@ object BatchSession extends Logging { | |
| m.owner, | ||
| m.proxyUser, | ||
| sessionStore, | ||
| None, | ||
|
Contributor
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. I think I now understand why the queue was added to the state store in the previous version, it was so that this value could be populated correctly. Is the queue in BatchSessions used by anything else other than the unit test?
Contributor
Author
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Currently, queue is primarily used during session creation and tracking. However, passing None during recover means that if the Livy server restarts, any recovered batch session will permanently lose its original queue context.
Contributor
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. It might be possible to remove this and change the unit test in BatchSessionSpec to verify that the queue is set via the mockApp. I am not entirely sure though, but if that is the case this PR could be further simplified. |
||
| mockApp.map { m => (_: BatchSession) => m }.getOrElse { s => | ||
| SparkApp.create(m.appTag, m.appId, None, livyConf, Option(s)) | ||
| }) | ||
|
|
@@ -152,6 +154,7 @@ class BatchSession( | |
| owner: String, | ||
| override val proxyUser: Option[String], | ||
| sessionStore: SessionStore, | ||
| val queue: Option[String], | ||
| sparkApp: BatchSession => SparkApp) | ||
| extends Session(id, name, owner, livyConf) with SparkAppListener { | ||
| import BatchSession._ | ||
|
|
||
Uh oh!
There was an error while loading. Please reload this page.