24 lines
478 B
Bash
Executable file
24 lines
478 B
Bash
Executable file
#!/usr/bin/env bash
|
|
|
|
bin=`dirname "$0"`
|
|
bin=`cd "$bin"; pwd`
|
|
|
|
. "$bin/spark-config.sh"
|
|
|
|
if [ -f "${SPARK_CONF_DIR}/spark-env.sh" ]; then
|
|
. "${SPARK_CONF_DIR}/spark-env.sh"
|
|
fi
|
|
|
|
# Find the port number for the master
|
|
if [ "$SPARK_MASTER_PORT" = "" ]; then
|
|
SPARK_MASTER_PORT=7077
|
|
fi
|
|
|
|
if [ "$SPARK_MASTER_IP" = "" ]; then
|
|
SPARK_MASTER_IP=`hostname`
|
|
fi
|
|
|
|
echo "Master IP: $ip"
|
|
|
|
"$bin"/spark-daemons.sh start spark.deploy.worker.Worker spark://$SPARK_MASTER_IP:$SPARK_MASTER_PORT
|