Skip to content

Commit 3eab411

Browse files
author
Arthur Rand
authored
only add driver.memory and driver.cores when not specified as a conf (apache#249)
1 parent f217b59 commit 3eab411

File tree

1 file changed

+8
-2
lines changed

1 file changed

+8
-2
lines changed

cli/dcos-spark/submit_builder.go

Lines changed: 8 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -530,13 +530,19 @@ func buildSubmitJson(cmd *SparkCommand) (string, error) {
530530

531531
for _, boolVal := range args.boolVals {
532532
if boolVal.b {
533-
args.properties[boolVal.propName] = "true"
533+
_, contains := args.properties[boolVal.propName]
534+
if !contains {
535+
args.properties[boolVal.propName] = "true"
536+
}
534537
}
535538
}
536539

537540
for _, stringVal := range args.stringVals {
538541
if len(stringVal.s) != 0 {
539-
args.properties[stringVal.propName] = stringVal.s
542+
_, contains := args.properties[stringVal.propName]
543+
if !contains {
544+
args.properties[stringVal.propName] = stringVal.s
545+
}
540546
}
541547
}
542548

0 commit comments

Comments
 (0)