scala> val file = sc.textFile("file:///your_text_file_path") scala> val words = file.flatMap(_.split(" ")) scala> val result = words.countByValue scala> result.get("For")
'IT > Spark' 카테고리의 다른 글
RDD 정리 (0) | 2017.12.08 |
---|---|
Practice using the results "jar" in Spark (0) | 2017.11.28 |
Reading before learning Spark (0) | 2017.11.22 |
spark develop environment (scala + intellij + sbt) (0) | 2017.11.22 |
Spark install Command Line history (0) | 2017.11.20 |