Merge pull request #43 from tawan0109/master
Fix `SPARKCSV_JARS` is not supported issue
This commit is contained in:
Коммит
a44536e99e
|
@ -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()
|
||||
|
|
Загрузка…
Ссылка в новой задаче