Skip to content
Snippets Groups Projects
Commit dd4cb33a authored by Jacek Lewandowski's avatar Jacek Lewandowski Committed by Sean Owen
Browse files

SPARK-5408: Use -XX:MaxPermSize specified by user instead of default in ...

...ExecutorRunner and DriverRunner

Author: Jacek Lewandowski <lewandowski.jacek@gmail.com>

Closes #4203 from jacek-lewandowski/SPARK-5408-1.3 and squashes the following commits:

d913686 [Jacek Lewandowski] SPARK-5408: Use -XX:MaxPermSize specified by used instead of default in ExecutorRunner and DriverRunner
parent e9a4fe12
No related branches found
No related tags found
No related merge requests found
......@@ -115,9 +115,19 @@ object CommandUtils extends Logging {
val userClassPath = command.classPathEntries ++ Seq(classPath)
val javaVersion = System.getProperty("java.version")
val permGenOpt = if (!javaVersion.startsWith("1.8")) Some("-XX:MaxPermSize=128m") else None
val javaOpts = workerLocalOpts ++ command.javaOpts
val permGenOpt =
if (!javaVersion.startsWith("1.8") && !javaOpts.exists(_.startsWith("-XX:MaxPermSize="))) {
// do not specify -XX:MaxPermSize if it was already specified by user
Some("-XX:MaxPermSize=128m")
} else {
None
}
Seq("-cp", userClassPath.filterNot(_.isEmpty).mkString(File.pathSeparator)) ++
permGenOpt ++ workerLocalOpts ++ command.javaOpts ++ memoryOpts
permGenOpt ++ javaOpts ++ memoryOpts
}
/** Spawn a thread that will redirect a given stream to a file */
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment