It doesn't make sense to send SPARK_HOME. The other variables were sent because they are meant to be job-specific; for example, SPARK_CLASSPATH can be set to configure different classpaths for each job, SPARK_JAVA_OPTS for JVM options, etc. Ideally these would all be things you can set in a configuration object when you create your SparkContext, but so far, they've been set through environment variables.

Anyway, I want to investigate the SPARK_MEMORY thing because I thought that I'd tested it, and I want to try this patch with Mesos as well. If it works, I think it's good to go.