File tree Expand file tree Collapse file tree 1 file changed +2
-5
lines changed
core/src/main/scala/org/apache/spark/deploy/worker Expand file tree Collapse file tree 1 file changed +2
-5
lines changed Original file line number Diff line number Diff line change @@ -71,11 +71,8 @@ object CommandUtils extends Logging {
7171 extraEnvironment = command.environment)
7272 val userClassPath = command.classPathEntries ++ Seq (classPath)
7373
74- val runner = getEnv(" JAVA_HOME" , command).map(_ + " /bin/java" ).getOrElse(" java" )
75- val jvmversion = Utils .executeAndGetOutput(Seq (runner + " -version " ),
76- extraEnvironment = command.environment)
77- val version = jvmversion.substring(jvmversion.indexOf(" \" " ) + 1 , jvmversion.indexOf(" _" ))
78- val permGenOpt = if (version.compareTo(" 1.8.0" ) < 0 ) Some (" -XX:MaxPermSize=128m" ) else None
74+ val javaVersion = System .getProperty(" java.version" )
75+ val permGenOpt = if (! javaVersion.startsWith(" 1.8" )) Some (" -XX:MaxPermSize=128m" ) else None
7976 Seq (" -cp" , userClassPath.filterNot(_.isEmpty).mkString(File .pathSeparator)) ++
8077 permGenOpt ++ libraryOpts ++ workerLocalOpts ++ command.javaOpts ++ memoryOpts
8178 }
You can’t perform that action at this time.
0 commit comments