diff --git a/bin/start-slaves.sh b/bin/start-slaves.sh index 74b70a24be976b5804cca4495fcbe23674ba3279..67b07215a2ac06278803cbdf35e6fbce4a0e5885 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