You can try the following in the spark-shell: 1. Run it in *Clustermode* by going inside the spark directory:
$ SPARK_MASTER=spark://masterip:7077 ./bin/spark-shell
val textFile = sc.textFile("hdfs://masterip/data/blah.csv")
textFile.take(10).foreach(println)
2. Now try running in *Localmode:*
$ SPARK_MASTER=local ./bin/spark-shell
val textFile = sc.textFile("hdfs://masterip/data/blah.csv")
textFile.take(10).foreach(println)
Both should print the first 10 lines from your blah.csv file.
