I'm new to spark, I downloaded precompiled spark.
When I try to run spark-shell from bin folder on command line, it returns
:cd /users/denver/spark-1.6/bin
:spark-shell
command not found
:cd /users/denver/spark-1.6
:./bin/spark-shell
The reason why you can not run the spark-shell
command in first case is because of environment variable
The terminal searches for executables in $PATH
. This is a Unix environment variable that lists directories containing system binaries (such as ls, echo, or gcc). If you call an executable that's not in a $PATH
directory (such as spark-shell
), you need to indicate its absolute path in the file system.
In the terminal .
is a synonym for the current working directory, thus ./bin/spark-shell
can work properly. You could equally well call ./some/path/bin/spark-shell
.
Hope it helps.