Skip to content
This repository has been archived by the owner on Dec 4, 2024. It is now read-only.

Commit

Permalink
Add driver sandbox uri to dispatcher UI (#190)
Browse files Browse the repository at this point in the history
  • Loading branch information
skonto authored and susanxhuynh committed Oct 6, 2017
1 parent dcab0e4 commit 7c09bfd
Showing 1 changed file with 7 additions and 4 deletions.
11 changes: 7 additions & 4 deletions docker/runit/service/spark/run
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,8 @@ set -x

exec 2>&1

SPARK_DIST_PATH=/opt/spark/dist

function export_daemon_opts() {
export SPARK_DAEMON_JAVA_OPTS=""
if [ "${DCOS_SERVICE_NAME}" != "spark" ]; then
Expand All @@ -26,12 +28,12 @@ function export_daemon_opts() {

function set_log_level() {
sed "s,<LOG_LEVEL>,${SPARK_LOG_LEVEL}," \
/opt/spark/dist/conf/log4j.properties.template >/opt/spark/dist/conf/log4j.properties
${SPARK_DIST_PATH}/conf/log4j.properties.template >${SPARK_DIST_PATH}/conf/log4j.properties
}

function add_if_non_empty() {
if [ -n "$2" ]; then
echo "$1=$2" >> /opt/spark/dist/conf/mesos-cluster-dispatcher.properties
echo "$1=$2" >> ${SPARK_DIST_PATH}/conf/mesos-cluster-dispatcher.properties
fi
}

Expand All @@ -53,6 +55,7 @@ function configure_properties() {
add_if_non_empty spark.ssl.trustStorePassword "${SPARK_SSL_TRUSTSTOREPASSWORD}"
add_if_non_empty spark.ssl.protocol "${SPARK_SSL_PROTOCOL}"
add_if_non_empty spark.ssl.enabledAlgorithms "${SPARK_SSL_ENABLEDALGORITHMS}"
echo "spark.mesos.proxy.baseURL=../../mesos" >> ${SPARK_DIST_PATH}/conf/mesos-cluster-dispatcher.properties
}


Expand All @@ -62,12 +65,12 @@ export_daemon_opts
configure_properties
ZK="master.mesos:2181"

exec /opt/spark/dist/bin/spark-class \
exec ${SPARK_DIST_PATH}/bin/spark-class \
org.apache.spark.deploy.mesos.MesosClusterDispatcher \
--port "${DISPATCHER_PORT}" \
--webui-port "${DISPATCHER_UI_PORT}" \
--master "mesos://zk://${ZK}/mesos" \
--zk "${ZK}" \
--host "${HOST}" \
--name "${DCOS_SERVICE_NAME}" \
--properties-file "/opt/spark/dist/conf/mesos-cluster-dispatcher.properties"
--properties-file "${SPARK_DIST_PATH}/conf/mesos-cluster-dispatcher.properties"

0 comments on commit 7c09bfd

Please sign in to comment.