-
-
Save sanjeevtripurari/5f83beaa9867bc3e8cb0d80a0dac498c to your computer and use it in GitHub Desktop.
wordcount using hadoop pig
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
A = load '/tmp/alice.txt'; | |
B = foreach A generate flatten(TOKENIZE((chararray)$0)) as word; | |
C = filter B by word matches '\\w+'; | |
D = group C by word; | |
E = foreach D generate COUNT(C), group; | |
store E into '/tmp/alice_wordcount'; |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment