I am having an issue where spark my executors are running out of permgen space. I launch my spark jobs using oozie's spark action. The same jobs run without issue if I launch them manually using spark-submit. I have tried increasing the permgen space using each of these methods
1. ---conf spark.executor.extraJavaOptions=-XX:MaxPermSize=2g
as a command-line option in <spark-opts> in oozie's workflow.xml
2. Increasing the oozie.launcher.mapreduce.child.java.opts in global <configuration> in oozie's workflow.xml
3. Programmatically in spark code, when SparkConf is created, using sparkConf.set("spark.executor.extraJavaOptions","-XX:MaxPermSize=2g")
Spark UI executor indicates that the property is successfully set. But when the executors are launched, they have the default of 256M in addition to the passed parameter which appears in single quotes :
{{JAVA_HOME}}/bin/java -server -XX:OnOutOfMemoryError='kill %p' -Xms6144m -Xmx6144m '-XX:MaxPermSize=2g' -Djava.io.tmpdir={{PWD}}/tmp '-Dspark.driver.port=45057' -Dspark.yarn.app.container.log.dir=<LOG_DIR> -XX:MaxPermSize=256m org.apache.spark.executor.CoarseGrainedExecutorBackend --driver-url spark://CoarseGrainedScheduler@10.0.0.124:45057 --executor-id 3 --hostname ip-10-0-0-126.us-west-2.compute.internal --cores 4 --app-id application_1471652816867_0103 --user-class-path file:$PWD/__app__.jar 1> <LOG_DIR>/stdout 2> <LOG_DIR>/stderr
Any ideas on how to increase the PermGen space ? I am running spark 1.6.2 with hadoop 2.7.2. Oozie version is 4.2