Skip to content

Instantly share code, notes, and snippets.

@guy9
Created August 15, 2024 07:04
Show Gist options
  • Save guy9/45b19ee53630f933c29e6a5e3dec6243 to your computer and use it in GitHub Desktop.
Save guy9/45b19ee53630f933c29e6a5e3dec6243 to your computer and use it in GitHub Desktop.
#!/bin/bash
export SPARK_NO_DAEMONIZE=true
if [ "$1" == "master" ]
then
echo "Starting a Spark master node"
start-master.sh
elif [ "$1" == "worker" ]
then
echo "Starting a Spark worker node"
start-worker.sh spark://spark-master:7077
else
echo "ERROR: Please call the entrypoint with argument 'master' or 'worker'"
exit 1
fi
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment