Update Spark单机版本环境搭建.md

This commit is contained in:
heibaiying 2019-03-22 13:46:57 +08:00 committed by GitHub
parent 2253985fee
commit fe561d883c
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -107,7 +107,7 @@ hadoop,hadoop
#### 3. 在scala交互式命令行中执行如下命名
```scala
val file = spark.sparkContext.textFile("file:///usr/app//wc.txt")
val file = spark.sparkContext.textFile("file:///usr/app/wc.txt")
val wordCounts = file.flatMap(line => line.split(",")).map((word => (word, 1))).reduceByKey(_ + _)
wordCounts.collect
```