From fe561d883c1035b6df3f614feb195fac9ae39ec7 Mon Sep 17 00:00:00 2001 From: heibaiying <31504331+heibaiying@users.noreply.github.com> Date: Fri, 22 Mar 2019 13:46:57 +0800 Subject: [PATCH] =?UTF-8?q?Update=20Spark=E5=8D=95=E6=9C=BA=E7=89=88?= =?UTF-8?q?=E6=9C=AC=E7=8E=AF=E5=A2=83=E6=90=AD=E5=BB=BA.md?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- notes/installation/Spark单机版本环境搭建.md | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/notes/installation/Spark单机版本环境搭建.md b/notes/installation/Spark单机版本环境搭建.md index 184d0ed..bd0c40f 100644 --- a/notes/installation/Spark单机版本环境搭建.md +++ b/notes/installation/Spark单机版本环境搭建.md @@ -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 ``` @@ -118,4 +118,4 @@ wordCounts.collect 通过spark shell web-ui可以查看作业的执行情况,访问端口为4040 -
\ No newline at end of file +