start-worker.sh 281 Bytes
Newer Older
Daniele Venzano's avatar
Daniele Venzano committed
1
2
3
4
5
#!/usr/bin/env bash
cd /opt/spark
export SPARK_LOCAL_IP=`awk 'NR==1 {print $1}' /etc/hosts`
./bin/spark-class org.apache.spark.deploy.worker.Worker \
	spark://${SPARK_MASTER_IP}:7077 --cores ${SPARK_WORKER_CORES:-4} --memory ${SPARK_WORKER_RAM:-4g} \
Daniele Venzano's avatar
Daniele Venzano committed
6
	-h ${SPARK_LOCAL_IP} \
Daniele Venzano's avatar
Daniele Venzano committed
7
	"$@"