[SPARK-13387][MESOS] Add support for SPARK_DAEMON_JAVA_OPTS with MesosClusterDispatcher.

## What changes were proposed in this pull request?

Add support for SPARK_DAEMON_JAVA_OPTS with MesosClusterDispatcher.

## How was the this patch tested?

Manual testing by launching dispatcher with SPARK_DAEMON_JAVA_OPTS

Author: Timothy Chen <tnachen@gmail.com>

Closes #11277 from tnachen/cluster_dispatcher_opts.
This commit is contained in:
Timothy Chen 2016-02-25 17:07:58 -08:00 committed by Andrew Or
parent f2cfafdfe0
commit 712995757c

View file

@ -48,8 +48,8 @@ class SparkClassCommandBuilder extends AbstractCommandBuilder {
String memKey = null;
String extraClassPath = null;
// Master, Worker, and HistoryServer use SPARK_DAEMON_JAVA_OPTS (and specific opts) +
// SPARK_DAEMON_MEMORY.
// Master, Worker, HistoryServer, ExternalShuffleService, MesosClusterDispatcher use
// SPARK_DAEMON_JAVA_OPTS (and specific opts) + SPARK_DAEMON_MEMORY.
if (className.equals("org.apache.spark.deploy.master.Master")) {
javaOptsKeys.add("SPARK_DAEMON_JAVA_OPTS");
javaOptsKeys.add("SPARK_MASTER_OPTS");
@ -69,6 +69,8 @@ class SparkClassCommandBuilder extends AbstractCommandBuilder {
} else if (className.equals("org.apache.spark.executor.MesosExecutorBackend")) {
javaOptsKeys.add("SPARK_EXECUTOR_OPTS");
memKey = "SPARK_EXECUTOR_MEMORY";
} else if (className.equals("org.apache.spark.deploy.mesos.MesosClusterDispatcher")) {
javaOptsKeys.add("SPARK_DAEMON_JAVA_OPTS");
} else if (className.equals("org.apache.spark.deploy.ExternalShuffleService") ||
className.equals("org.apache.spark.deploy.mesos.MesosExternalShuffleService")) {
javaOptsKeys.add("SPARK_DAEMON_JAVA_OPTS");