start-master.sh 374 Bytes
Newer Older
Daniele Venzano's avatar
Daniele Venzano committed
1
2
3
4
5
6
7
8
9
10
11
#!/usr/bin/env bash
export SPARK_MASTER_IP=`awk 'NR==1 {print $1}' /etc/hosts`
export SPARK_LOCAL_IP=`awk 'NR==1 {print $1}' /etc/hosts`
export SPARK_MASTER_PORT=7077
export SPARK_MASTER_WEBUI_PORT=8080

cd /opt/spark
./bin/spark-class org.apache.spark.deploy.master.Master \
  --host $SPARK_MASTER_IP --port $SPARK_MASTER_PORT --webui-port $SPARK_MASTER_WEBUI_PORT \
  $@