简体   繁体   English

Spark-shell Git Bash

[英]Spark-shell Git Bash

I cannot get the spark-shell command to work on Git bash.我无法让 spark-shell 命令在 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.我相当确定我的环境设置正确,就像我在命令提示符的任何目录中运行 spark-shell 一样,它对我来说很好用。

However, when I run spark-shell in bash, it outputs this value instead of running the actual shell:但是,当我在 bash 中运行 spark-shell 时,它输出这个值而不是运行实际的 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

In a git bash, try and use:在 git bash 中,尝试使用:

  • simple quotes ' (instead of double-quotes " )简单引号' (而不是双引号"
  • / instead of \\ : C:/.../... or /c/.../... /而不是\\ : C:/.../.../c/.../...

That would be more compatible with the shell used by Git bash.这将与 Git bash 使用的 shell 更兼容。

然后将其作为RUN=($( spark-shell )) && "${RUN[@]}"

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM