aboutsummaryrefslogtreecommitdiff
path: root/bin/start-slaves.sh
diff options
context:
space:
mode:
authorMatei Zaharia <matei@eecs.berkeley.edu>2012-11-27 21:00:04 -0800
committerMatei Zaharia <matei@eecs.berkeley.edu>2012-11-27 21:00:04 -0800
commit59c0a9ad164ef8a6382737aa197f41e407e1c89d (patch)
tree069068fa84f96a43fbaa2d6a5b35081ef2a05746 /bin/start-slaves.sh
parentf410a111ada489f9fd8971e047c9927f434773be (diff)
downloadspark-59c0a9ad164ef8a6382737aa197f41e407e1c89d.tar.gz
spark-59c0a9ad164ef8a6382737aa197f41e407e1c89d.tar.bz2
spark-59c0a9ad164ef8a6382737aa197f41e407e1c89d.zip
Use hostname instead of IP in deploy scripts to let Akka connect properly
Diffstat (limited to 'bin/start-slaves.sh')
-rwxr-xr-xbin/start-slaves.sh15
1 files changed, 2 insertions, 13 deletions
diff --git a/bin/start-slaves.sh b/bin/start-slaves.sh
index 74b70a24be..67b07215a2 100755
--- a/bin/start-slaves.sh
+++ b/bin/start-slaves.sh
@@ -15,20 +15,9 @@ if [ "$SPARK_MASTER_PORT" = "" ]; then
fi
if [ "$SPARK_MASTER_IP" = "" ]; then
- hostname=`hostname`
- hostouput=`host "$hostname"`
-
- if [[ "$hostouput" == *"not found"* ]]; then
- echo $hostouput
- echo "Fail to identiy the IP for the master."
- echo "Set SPARK_MASTER_IP explicitly in configuration instead."
- exit 1
- fi
- ip=`host "$hostname" | cut -d " " -f 4`
-else
- ip=$SPARK_MASTER_IP
+ SPARK_MASTER_IP=`hostname`
fi
echo "Master IP: $ip"
-"$bin"/spark-daemons.sh start spark.deploy.worker.Worker spark://$ip:$SPARK_MASTER_PORT \ No newline at end of file
+"$bin"/spark-daemons.sh start spark.deploy.worker.Worker spark://$SPARK_MASTER_IP:$SPARK_MASTER_PORT