Spark:错误未找到spark1.2.1中的值SC

时间:2016-01-21 04:06:21

标签: scala apache-spark

在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

0 个答案:

没有答案