zaryanezrya

test

May 25th, 2018
160
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.63 KB | None | 0 0
  1. # Test mapper.py and reducer.py locally first
  2.  
  3. # very basic test
  4. hduser@ubuntu:~$ echo "foo foo quux labs foo bar quux" | /home/hduser/mapper.py
  5. foo 1
  6. foo 1
  7. quux 1
  8. labs 1
  9. foo 1
  10. bar 1
  11. quux 1
  12.  
  13. hduser@ubuntu:~$ echo "foo foo quux labs foo bar quux" | /home/hduser/mapper.py | sort -k1,1 | /home/hduser/reducer.py
  14. bar 1
  15. foo 3
  16. labs 1
  17. quux 2
  18.  
  19. # using one of the ebooks as example input
  20. # (see below on where to get the ebooks)
  21. hduser@ubuntu:~$ cat /tmp/gutenberg/20417-8.txt | /home/hduser/mapper.py
  22. The 1
  23. Project 1
  24. Gutenberg 1
  25. EBook 1
  26. of 1
  27. [...]
  28. (you get the idea)
Add Comment
Please, Sign In to add comment