Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

How do I start Spark's Shell on Window's 8.1?

I keep trying to get the Spark shell running to no avail.

OS: Windows 8.1

Spark: 1.3.1

Java: 8

Downloaded both prepackaged and unpackaged variants (unpackaged variant built by maven and simple build tool). I've attempted to resolve my issue three different ways to no avail.

1) From my Spark Directory, I attempt to start its shell with variants of spark-shell.cmd or .\bin\spark-shell.cmd.

I consistently get an error along these lines:

'C:\Program' is not recognized as an internal or external command, operable program or batch file.

Knowing a possible whitespace error when I see one, I've attempted variants of my command with quotes, full paths, etc. No results thus far.

2) Next, I've tried simply moving my spark directory to highest level of my harddrive (C:\ \spark-1.3.1-bin-hadoop2.6).

With whitespace eliminated as a possible issue, my error messages now fall along these lines:

find: 'version': No such file or directory else was unexpected at this time.

3) I've tried to invoke Spark through Scala somehow (as some documents and screencasts given the impression). I can confirm that Scala (2.11.6) is properly configured within my environment variables. Its shell works correctly.

If there's supposedly a command to make it start the Spark shell, I'm listening. Current attempts through Scala is another dead end.

Thank you.

like image 231
TheHolyDarkness Avatar asked Feb 11 '23 04:02

TheHolyDarkness


2 Answers

In this file bin\spark-class2.cmd find the line

set RUNNER="%JAVA_HOME%\bin\java"

and replace it with (remove the ")

set RUNNER=%JAVA_HOME%\bin\java
like image 108
r313pp Avatar answered Feb 16 '23 04:02

r313pp


  • Moving Spark directory under C:\ worked for me.(C:\spark-1.6.0-bin-hadoop2.6).

  • I also updated the system's PATH variable for find.exe

like image 22
Vibha Avatar answered Feb 16 '23 03:02

Vibha