Spark-shell Git Bash

Viewed 1069

I cannot get the spark-shell command to work on Git bash. I am fairly sure my environment is set up correctly as if I run spark-shell in any directory in command prompt, it works just fine for me.

However, when I run spark-shell in bash, it outputs this value instead of running the actual shell:

"C:\Program Files\Java\jdk1.8.0_191\bin\java" -cp "C:\spark\spark-2.4.0-bin- 
hadoop2.7/conf\;C:\spark\spark-2.4.0-bin-hadoop2.7\jars\*" "- 
Dscala.usejavacp=true"-Xmx1g org.apache.spark.deploy.SparkSubmit --class 
org.apache.spark.repl.Main --name "Spark shell" spark-shell
2 Answers

In a git bash, try and use:

  • simple quotes ' (instead of double-quotes ")
  • / instead of \: C:/.../... or /c/.../...

That would be more compatible with the shell used by Git bash.

Then run it as RUN=($( spark-shell )) && "${RUN[@]}"

Related