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")
|
||||
@Help("Main class to be launched (optional if in manifest)")
|
||||
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.)")
|
||||
@Value("file")
|
||||
yarnIdFile: String,
|
||||
|
|
|
|||
|
|
@ -55,8 +55,14 @@ case class SparkSubmit(
|
|||
options: SparkSubmitOptions
|
||||
) extends App with ExtraArgsApp {
|
||||
|
||||
val helper = new Helper(options.common, remainingArgs)
|
||||
val jars = helper.fetch(sources = false, javadoc = false)
|
||||
val helper: Helper = new Helper(
|
||||
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) =
|
||||
if (options.sparkVersion.isEmpty)
|
||||
|
|
|
|||
Loading…
Reference in New Issue