17 lines
464 B
Bash
17 lines
464 B
Bash
#!/bin/bash
|
|
|
|
export SPARK_MASTER_HOST=`hostname`
|
|
|
|
. "/opt/spark/sbin/spark-config.sh"
|
|
|
|
. "/opt/spark/bin/load-spark-env.sh"
|
|
|
|
mkdir -p $SPARK_MASTER_LOG
|
|
|
|
export SPARK_HOME=/opt/spark
|
|
|
|
ln -sf /dev/stdout $SPARK_MASTER_LOG/spark-master.out
|
|
|
|
cd /opt/spark/bin && /opt/spark/sbin/../bin/spark-class org.apache.spark.deploy.master.Master \
|
|
--ip $SPARK_MASTER_HOST --port $SPARK_MASTER_PORT --webui-port $SPARK_MASTER_WEBUI_PORT >> $SPARK_MASTER_LOG/spark-master.out
|