-
Notifications
You must be signed in to change notification settings - Fork 28.5k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Fix SPARK-1609: Executor fails to start when Command.extraJavaOptions contains multiple Java options #547
Conversation
Can one of the admins verify this patch? |
val extraOpts = command.extraJavaOptions.toSeq | ||
val extraOpts = command.extraJavaOptions match { | ||
case Some(opts) => | ||
opts.split("\\s+").toSeq |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Use Utils.splitCommandString instead of this, in case people pass in stuff with quotes.
@@ -48,7 +48,13 @@ object CommandUtils extends Logging { | |||
def buildJavaOpts(command: Command, memory: Int, sparkHome: String): Seq[String] = { | |||
val memoryOpts = Seq(s"-Xms${memory}M", s"-Xmx${memory}M") | |||
// Note, this will coalesce multiple options into a single command component | |||
val extraOpts = command.extraJavaOptions.toSeq | |||
val extraOpts = command.extraJavaOptions match { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Up to you, but could be written a bit more consicely
val extraOpts = command.extraJavaOptions.map(Utils.splitCommandString).getOrElse(Seq())
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Yes, val extraOpts = command.extraJavaOptions.map(Utils.splitCommandString).getOrElse(Seq())
is better
Jenkins, test this please. |
Merged build triggered. |
Merged build started. |
Merged build finished. All automated tests passed. |
All automated tests passed. |
Thanks for the fix! I've merged this |
… contains multiple Java options Author: witgo <witgo@qq.com> Closes #547 from witgo/SPARK-1609 and squashes the following commits: deb6a4c [witgo] review commit 91da0bb [witgo] Merge branch 'master' of https://github.com/apache/spark into SPARK-1609 0640852 [witgo] review commit 8f90b22 [witgo] Merge branch 'master' of https://github.com/apache/spark into SPARK-1609 bcf36cb [witgo] Merge branch 'master' of https://github.com/apache/spark into SPARK-1609 1185605 [witgo] fix extraJavaOptions split f7c0ab7 [witgo] bugfix 86fc4bb [witgo] bugfix 8a265b7 [witgo] Fix SPARK-1609: Executor fails to start when use spark-submit
… contains multiple Java options Author: witgo <witgo@qq.com> Closes apache#547 from witgo/SPARK-1609 and squashes the following commits: deb6a4c [witgo] review commit 91da0bb [witgo] Merge branch 'master' of https://github.com/apache/spark into SPARK-1609 0640852 [witgo] review commit 8f90b22 [witgo] Merge branch 'master' of https://github.com/apache/spark into SPARK-1609 bcf36cb [witgo] Merge branch 'master' of https://github.com/apache/spark into SPARK-1609 1185605 [witgo] fix extraJavaOptions split f7c0ab7 [witgo] bugfix 86fc4bb [witgo] bugfix 8a265b7 [witgo] Fix SPARK-1609: Executor fails to start when use spark-submit
Upgrade hadoop to new version.
No description provided.