r/mit6824clojure • u/TheLastSock • Jul 04 '20
Map reduce questions
Feel free to ask questions about map reduce here. Lab & and lecture
3
Upvotes
r/mit6824clojure • u/TheLastSock • Jul 04 '20
Feel free to ask questions about map reduce here. Lab & and lecture
1
u/m_woodworth Jul 08 '20
For anybody who'se given this a shot - did you have to modify the time interval for monitoring if a worker is still active? The lab recommends 10 seconds, but I found that the mapping portion can take up to 15 for some of the larger files (reducing takes no time at all, so not an issue).
This might be related to the way I've structured the system, e.g. I only check-in with the master once a worker completes it's entire map task. I could instead check in while processing the map task at different intervals, but that adds quite a bit of overhead just to satisfy the 10 second constraint.
Also, the test script removes certain files in the "mr-tmp/" folder in between different test runs, so as not to mix the outputs from different test stages (e.g. to avoid combining the intermediate files from wordcount ones). The indexer test removes all files matching "mr-*", however after the indexer test both the parallel map and parallel reduce test only remove files matching the following patterns:
"mr-tmp/mr-worker*"
"mr-tmp/mr-out*"
I was using the format "mr-tmp/mr-[0-9]-[0-9]" for intermediate files, where the first [0-9] is the worker and the second is the reduce bucket that keys slot into. This meant I had to modify the test script to remove those files in between runs, otherwise the parallel map and parallel reduce tests would append to files created by the indexer test. I found this confusing since MIT's website says this:
"A reasonable naming convention for intermediate files is mr-X-Y, where X is the Map task number, and Y is the reduce task number."
But then the test script doesnt remove those files between runs (after the indexer portion).