diff options
Diffstat (limited to 'bin/start-slaves.sh')
-rwxr-xr-x | bin/start-slaves.sh | 10 |
1 files changed, 7 insertions, 3 deletions
diff --git a/bin/start-slaves.sh b/bin/start-slaves.sh index f348ea063f..390247ca4a 100755 --- a/bin/start-slaves.sh +++ b/bin/start-slaves.sh @@ -14,7 +14,11 @@ if [ "$SPARK_MASTER_PORT" = "" ]; then SPARK_MASTER_PORT=7077 fi -hostname=`hostname` -ip=`host "$hostname" | cut -d " " -f 4` +if [ "$SPARK_MASTER_IP" = "" ]; then + SPARK_MASTER_IP=`hostname` +fi + +echo "Master IP: $SPARK_MASTER_IP" -"$bin"/spark-daemons.sh start spark.deploy.worker.Worker spark://$ip:$SPARK_MASTER_PORT
\ No newline at end of file +# Launch the slaves +exec "$bin/slaves.sh" cd "$SPARK_HOME" \; "$bin/start-slave.sh" spark://$SPARK_MASTER_IP:$SPARK_MASTER_PORT |