Fix `SPARKCSV_JARS` is not supported issue
This commit is contained in:
Родитель
ffa55b55f6
Коммит
61b84579e6
|
@ -136,7 +136,7 @@ Setting `spark.local.dir` parameter is important. When local Spark instance dist
|
|||
|
||||
### Running in Standalone mode
|
||||
```
|
||||
sparkclr-submit.cmd --verbose --exe SparkCLRSamples.exe %SPARKCLR_HOME%\samples sparkclr.sampledata.loc hdfs://path/to/sparkclr/sampledata
|
||||
sparkclr-submit.cmd --verbose --master spark://host:port --exe SparkCLRSamples.exe %SPARKCLR_HOME%\samples sparkclr.sampledata.loc hdfs://path/to/sparkclr/sampledata
|
||||
```
|
||||
|
||||
### Running in YARN mode
|
||||
|
|
|
@ -44,6 +44,8 @@ class SparkCLRSubmitArguments(args: Seq[String], env: Map[String, String], exitF
|
|||
|
||||
var files: String = null
|
||||
|
||||
var jars: String = env.getOrElse("SPARKCSV_JARS", "").replace(";",",")
|
||||
|
||||
var primaryResource: String = null
|
||||
|
||||
var propertiesFile: String = null
|
||||
|
@ -133,6 +135,13 @@ class SparkCLRSubmitArguments(args: Seq[String], env: Map[String, String], exitF
|
|||
case FILES =>
|
||||
files = Utils.resolveURIs(value)
|
||||
|
||||
case JARS =>
|
||||
if (jars != "") {
|
||||
jars = s"$jars,$value"
|
||||
} else {
|
||||
jars = value
|
||||
}
|
||||
|
||||
case HELP =>
|
||||
printUsageAndExit()
|
||||
|
||||
|
@ -224,6 +233,14 @@ class SparkCLRSubmitArguments(args: Seq[String], env: Map[String, String], exitF
|
|||
case _ =>
|
||||
}
|
||||
|
||||
if (jars != null && !jars.trim.isEmpty) {
|
||||
if (cmd == "") {
|
||||
cmd += s"--jars $jars"
|
||||
} else {
|
||||
cmd += s" --jars $jars"
|
||||
}
|
||||
}
|
||||
|
||||
master match {
|
||||
|
||||
case m if m == null || m.startsWith("local") => concatLocalCmdOptions()
|
||||
|
|
Загрузка…
Ссылка в новой задаче