- Extract the spark folder spark-3.1.2-bin-hadoop3.2.tgz
tar -xfz ./spark-3.1.2-bin-hadoop3.2.tgz
- Create folder ~/spark
- Move the spark folder
$ mv ./spark-3.1.2-bin-hadoop3.2 ~/spark/spark-3.1.2
- Add export variables and update the path using ZSH profile (Replace "{Your User}" to your user in OS)
$ echo '\nexport JAVA_HOME=$(/usr/libexec/java_home)' >> ~/.zshrc
$ echo 'export SPARK_HOME="/Users/{Your User}/spark/spark-3.1.2"' >> ~/.zshrc
$ echo 'export PATH="$SPARK_HOME/bin:$PATH"\n' >> ~/.zshrc
Link to download and Install
- Install the Scala metals extension