hadoop - Java Spark spilling in-memory map OutOfMemoryError error -
i'm running following code (a contains 10000 rows):
indexedrowmatrix qtmp = new indexedrowmatrix(a.rows()); indexedrowmatrix qtmpt = qtmp.tocoordinatematrix().transpose().toindexedrowmatrix(); i following error:
15/06/19 10:08:52 info externalappendonlymap: thread 66 spilling in-memory map of 24.8 mb disk (1 time far) 15/06/19 10:08:54 info externalappendonlymap: thread 66 spilling in-memory map of 24.8 mb disk (2 times far) 15/06/19 10:08:57 info externalappendonlymap: thread 66 spilling in-memory map of 24.8 mb disk (3 times far) 15/06/19 10:09:02 error executor: exception in task 0.0 in stage 9.0 (tid 9) java.lang.outofmemoryerror: java heap space i have tried tuning memory various parameters well:
sparkconf conf = new sparkconf(); conf.set("spark.serializer", "org.apache.spark.serializer.kryoserializer"); conf.setappname("test"); conf.setmaster("local[2]"); conf.set("spark.executor.memory", "6g"); conf.set("spark.driver.maxresultsize", "1g"); conf.set("spark.shuffle.spill", "false"); conf.set("spark.storage.memoryfraction", "0.3"); conf.set("spark.eventlog.enabled", "false"); conf.set("driver-memory", "4g")`; javasparkcontext sc = new javasparkcontext(conf); is there reason i'm consistently getting spilling error?
you should run application overridden java options.
start program -xms=[size] -xmx -xx:maxpermsize=[size] -xx:maxnewsize=[size]
for example -
-xms512m -xmx1152m -xx:maxpermsize=256m -xx:maxnewsize=256m
Comments
Post a Comment