Last active
September 5, 2019 02:22
-
-
Save dgadiraju/6ae39a3d8cdfceb111701afe59dbeae6 to your computer and use it in GitHub Desktop.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
val lines = sc.textFile("/user/training/wordcountinput.txt") | |
val words = lines.flatMap(line => line.split(" ")) | |
val wordTuples = words.map(word => (word, 1)) |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
val lines = sc.textFile("/user/training/wordcountinput.txt") | |
val wordTuples = lines.flatMap(line => line.split(" ").map(word => (word, 1))) |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment