Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- # Test mapper.py and reducer.py locally first
- # very basic test
- hduser@ubuntu:~$ echo "foo foo quux labs foo bar quux" | /home/hduser/mapper.py
- foo 1
- foo 1
- quux 1
- labs 1
- foo 1
- bar 1
- quux 1
- hduser@ubuntu:~$ echo "foo foo quux labs foo bar quux" | /home/hduser/mapper.py | sort -k1,1 | /home/hduser/reducer.py
- bar 1
- foo 3
- labs 1
- quux 2
- # using one of the ebooks as example input
- # (see below on where to get the ebooks)
- hduser@ubuntu:~$ cat /tmp/gutenberg/20417-8.txt | /home/hduser/mapper.py
- The 1
- Project 1
- Gutenberg 1
- EBook 1
- of 1
- [...]
- (you get the idea)
Add Comment
Please, Sign In to add comment