在spark shell 1.2.1中获得以下错误
scala> sc.textFile("/user/cloudera/departments").collect().foreach(println)
<console>:11: error: not found: value sc
sc.textFile("/user/clouderadepartments").collect().foreach(prenter code hereintln)
下面是我如何启动spark-shell
[cloudera@quickstart ~]$ cd spark-1.2.1-bin-hadoop2.4
[cloudera@quickstart spark-1.2.1-bin-hadoop2.4]$ bin/spark-shell --master local