mirror of https://github.com/sbt/sbt.git
Allow to manually add extra JARs in the submitted job classpaths
This commit is contained in:
parent
974dee8cf4
commit
2807f64cb5
|
|
@ -229,6 +229,9 @@ case class SparkSubmitOptions(
|
||||||
@Short("main")
|
@Short("main")
|
||||||
@Help("Main class to be launched (optional if in manifest)")
|
@Help("Main class to be launched (optional if in manifest)")
|
||||||
mainClass: String,
|
mainClass: String,
|
||||||
|
@Short("J")
|
||||||
|
@Help("Extra JARs to be added in the classpath of the job")
|
||||||
|
extraJars: List[String],
|
||||||
@Help("If master is yarn-cluster, write YARN app ID to a file. (The ID is deduced from the spark-submit output.)")
|
@Help("If master is yarn-cluster, write YARN app ID to a file. (The ID is deduced from the spark-submit output.)")
|
||||||
@Value("file")
|
@Value("file")
|
||||||
yarnIdFile: String,
|
yarnIdFile: String,
|
||||||
|
|
|
||||||
|
|
@ -55,8 +55,14 @@ case class SparkSubmit(
|
||||||
options: SparkSubmitOptions
|
options: SparkSubmitOptions
|
||||||
) extends App with ExtraArgsApp {
|
) extends App with ExtraArgsApp {
|
||||||
|
|
||||||
val helper = new Helper(options.common, remainingArgs)
|
val helper: Helper = new Helper(
|
||||||
val jars = helper.fetch(sources = false, javadoc = false)
|
options.common,
|
||||||
|
remainingArgs,
|
||||||
|
extraJars = options.extraJars.map(new File(_))
|
||||||
|
)
|
||||||
|
val jars =
|
||||||
|
helper.fetch(sources = false, javadoc = false) ++
|
||||||
|
options.extraJars.map(new File(_))
|
||||||
|
|
||||||
val (scalaVersion, sparkVersion) =
|
val (scalaVersion, sparkVersion) =
|
||||||
if (options.sparkVersion.isEmpty)
|
if (options.sparkVersion.isEmpty)
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue