I am new to Scala and am trying to code read a file using the following code
scala> val textFile = sc.textFile(\"README.md\") scala> textFile.count() <
You should run this code using ./spark-shell. It's scala repl with provided sparkContext. You can find it in your apache spark distribution in folder spark-1.4.1/bin.
./spark-shell
spark-1.4.1/bin