-
Notifications
You must be signed in to change notification settings - Fork 314
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
LIVY-246 Support multiple Spark home in runtime #318
base: master
Are you sure you want to change the base?
Changes from 4 commits
6926390
04e5241
1c6592e
cc736d4
598d13e
da6edff
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 |
---|---|---|
|
@@ -18,6 +18,7 @@ | |
|
||
package com.cloudera.livy.server.batch | ||
|
||
import java.io.File | ||
import java.lang.ProcessBuilder.Redirect | ||
|
||
import scala.concurrent.{ExecutionContext, ExecutionContextExecutor} | ||
|
@@ -62,7 +63,11 @@ object BatchSession { | |
request.conf, request.jars, request.files, request.archives, request.pyFiles, livyConf)) | ||
require(request.file != null, "File is required.") | ||
|
||
val builder = new SparkProcessBuilder(livyConf) | ||
val builder = new SparkProcessBuilder(livyConf, request.sparkVersion) | ||
request.sparkVersion.map({ value => | ||
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. You don't need maps here, this should work fine as:
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 we will need map in builder.env as sparkConfDir is optional variable and builder.env declaration needs a string. Agreed we can remove the first map of request.sparkVersion. Will make the changes and deploy. |
||
val sparkConf = livyConf.sparkHome(request.sparkVersion).map(_ + File.separator + "conf") | ||
sparkConf.map(sc => builder.env("SPARK_CONF_DIR", sc)) | ||
}) | ||
builder.conf(conf) | ||
|
||
proxyUser.foreach(builder.proxyUser) | ||
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I think this was added by accident