Skip to content

Commit

Permalink
Fix --die-on-broken-pipe not propagated properly
Browse files Browse the repository at this point in the history
At the end of parsing options, we add an empty string to child
arguments. This caused the arguments to py4j.JavaGateway to be
interpreted as ["", "--die-on-broken-pipe", "0"].
  • Loading branch information
andrewor14 committed May 16, 2014
1 parent 6fba412 commit a823661
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 2 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -128,7 +128,7 @@ object SparkSubmit {
}
if (args.primaryResource == PYSPARK_SHELL) {
args.mainClass = "py4j.GatewayServer"
args.childArgs ++= ArrayBuffer("--die-on-broken-pipe", "0")
args.childArgs = ArrayBuffer("--die-on-broken-pipe", "0")
} else {
// If a python file is provided, add it to the child arguments and list of files to deploy.
// Usage: PythonAppRunner <main python file> <extra python files> [app arguments]
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -302,7 +302,9 @@ private[spark] class SparkSubmitArguments(args: Seq[String]) {
parse(tail)
}
} else {
childArgs += value
if (!value.isEmpty) {
childArgs += value
}
parse(tail)
}

Expand Down

0 comments on commit a823661

Please sign in to comment.