I am having problems building Spark using sbt on my machine. An attempt to build without allocating additional memory either ends or the time runs out in the garbage collector; The exact problem was different at different times when I tried. However, any attempt to change the allocated memory, either through Xmx or Xms, and whether it gave more or limited, fails because sbt does not recognize -Xmx or -Xms as a command.
Here is an example of the type of command I tried (from the Spark source directory):
sbt -Xmx2g assembly
Here is the error I get:
java.util.concurrent.ExecutionException:java.lang.OutOfMemoryError: GC overhead limit exceeded
Use 'last' for the full log.
Not a valid command: Xmx2g
Not a valid project: Xmx2g
Expected ':' (if selecting a configuration)
Not a valid key: Xmx2g
Xmx2g
^
I am running 64bit Java, version 1.8.0_20.
source
share