WestCoastProjects
WestCoastProjects

Reputation: 63221

How to specify maven_opts to build spark on windows

After specifying MAVEN_OPTS, there is a problem by the jvm to recognize and build.

D:\shared\funcs>set MAVEN_OPTS="-Xmx1300M -XX:MaxPermSize=384M -XX:ReservedCodeCacheSize=384m"


D:\shared\funcs>mvn -Pyarn -Phadoop-2.3 -Phive -DskipTests clean compile package
Invalid maximum heap size: -Xmx1300M -XX:MaxPermSize=384M -XX:ReservedCodeCacheSize=384m
Error: Could not create the Java Virtual Machine.
Error: A fatal exception has occurred. Program will exit.

Note that I am able to use much larger values successfully when running under linux.

Specifically on linux the following succeeds:

$ export MAVEN_OPTS="-Xmx3000m -XX:MaxPermSize=384M -XX:ReservedCodeCacheSize=384m"

Upvotes: 1

Views: 906

Answers (1)

WestCoastProjects
WestCoastProjects

Reputation: 63221

I was able to make it compile while only specifying the MaxPermSize: as follows:

set MAVEN_OPTS="-XX:MaxPermSize=384M"

I was unable to figure out how to get more than one element in it (e.g. the -xMx1024m) : but the above turned out to be sufficient

Upvotes: 1

Related Questions