Database Reference
In-Depth Information
The Spark shell
Spark supports writing programs interactively using either the Scala or Python REPL (that
is, the Read-Eval-Print-Loop , or interactive shell). The shell provides instant feedback as
we enter code, as this code is immediately evaluated. In the Scala shell, the return result
and type is also displayed after a piece of code is run.
To use the Spark shell with Scala, simply run ./bin/spark-shell from the Spark
base directory. This will launch the Scala shell and initialize SparkContext , which is
available to us as the Scala value, sc . Your console output should look similar to the fol-
lowing screenshot:
Search WWH ::




Custom Search