Trying to follow the spark tutorial but get the following error -
https://spark.apache.org/docs/latest/quick-start.html
"name 'spark' is not defined"
Using Python version 2.6.6 (r266:84292, Nov 22 2013 12:16:22)
SparkContext available as sc.
>>> import pyspark
>>> textFile = spark.read.text("README.md")
Traceback (most recent call last):
File "<stdin>", line 1, in <module>
NameError: name 'spark' is not defined
This is how I start it -
./bin/pyspark --master local[*]