bigtop-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From c..@apache.org
Subject bigtop git commit: BIGTOP-2113. Spark master doesn't bind to the host
Date Mon, 09 Nov 2015 01:13:24 GMT
Repository: bigtop
Updated Branches:
  refs/heads/master 7ae4a0876 -> 0960883b0


BIGTOP-2113. Spark master doesn't bind to the host

Signed-off-by: Konstantin Boudnik <cos@apache.org>


Project: http://git-wip-us.apache.org/repos/asf/bigtop/repo
Commit: http://git-wip-us.apache.org/repos/asf/bigtop/commit/0960883b
Tree: http://git-wip-us.apache.org/repos/asf/bigtop/tree/0960883b
Diff: http://git-wip-us.apache.org/repos/asf/bigtop/diff/0960883b

Branch: refs/heads/master
Commit: 0960883b00869fc80edf36365ce0788207ce36ff
Parents: 7ae4a08
Author: Sergey Soldatov <sergey.soldatov@gmail.com>
Authored: Sun Nov 8 16:58:37 2015 -0800
Committer: Konstantin Boudnik <cos@apache.org>
Committed: Sun Nov 8 17:11:54 2015 -0800

----------------------------------------------------------------------
 bigtop-packages/src/common/spark/spark-master.svc | 12 +++++++++++-
 1 file changed, 11 insertions(+), 1 deletion(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/bigtop/blob/0960883b/bigtop-packages/src/common/spark/spark-master.svc
----------------------------------------------------------------------
diff --git a/bigtop-packages/src/common/spark/spark-master.svc b/bigtop-packages/src/common/spark/spark-master.svc
index 6d8f56a..1823b99 100644
--- a/bigtop-packages/src/common/spark/spark-master.svc
+++ b/bigtop-packages/src/common/spark/spark-master.svc
@@ -39,8 +39,18 @@ start() {
 
     LOG_FILE=/var/log/spark/${DAEMON}.out
 
+    if [ -f $CONF_DIR/spark-env.sh ]; then
+        . $CONF_DIR/spark-env.sh
+    fi
+
+    if [ "$SPARK_MASTER_IP" = "" ]; then
+        SPARK_MASTER_IP=`hostname`
+    fi
+
+
     su -s /bin/bash $SVC_USER -c "nohup nice -n 0 \
-        ${EXEC_PATH} org.apache.spark.deploy.master.Master $DAEMON_FLAGS \
+        ${EXEC_PATH} org.apache.spark.deploy.master.Master \
+        --ip $SPARK_MASTER_IP $DAEMON_FLAGS \
         > $LOG_FILE 2>&1 & "'echo $!' > "$PIDFILE"
 
     sleep 3


Mime
View raw message