Before starting this lab, please back up all of your prior labs' solutions.
x
$ cd cse-lab$ git commit -a -m "upload lab3-sol"# Then, pull this lab from the repo:
$ git pull# Next, switch to the lab4 branch:
$ git checkout lab4# Notice: lab4 is based on lab3.
# Please merge with branch lab3, and solve the conflicts.
$ git merge lab3# After merging the conflicts, you should be able to compile the new project successfully:
$ chmod -R o+w `pwd`
$ sudo docker run -it --rm --privileged --cap-add=ALL -v `pwd`:/home/stu/cse-lab lqyuan980413/cselab_env:2022lab4/bin/bash$ cd cse-lab$ make clean && make(Reference: MIT 6.824 Distributed Systems)
In this lab, you are asked to build a MapReduce framework on top of your Distributed Filesystem implemented in Lab1-3.
You will implement a worker process that calls Map and Reduce functions and handles reading and writing files, and a coordinator process that hands out tasks to workers and copes with failed workers.
You can refer to the MapReduce paper for more details (Note that this lab uses "coordinator" instead of the paper's "master").
There are four files added for this part: mr_protocol.h, mr_sequential.cc, mr_coordinator.cc, mr_worker.cc.
mr_sequential.cc is a sequential mapreduce implementation, running Map and Reduce once at a time within a single process.mr_sequential.cc.mr_coordinator.cc and mr_worker.cc. There will be only one coordinator process, but one or more worker processes executing concurrently.RPC. One way to get started is to think about the RPC protocol in mr_protocol.h first.mr_protocol.h.Done() loop returns true indicating that all tasks are completely finished.Before grading, you need to check your lab3 implementation using the grade script in lab3. Your file system implemented in lab3 should work fine, or you shall not pass part B-b.
After you have implemented part1 & part2, run the grading script:
xxxxxxxxxx$ ./grade.sh# ...Passed part A (Word Count)Passed part B-a (Word Count with distributed MapReduce)Passed part B-b (Word Count with distributed MapReduce with performance requirements)Lab4 passed
Passed all tests!Score: 100/100We will test your MapReduce following the evaluation criteria above.
After all above done:
xxxxxxxxxx% make handin
That should produce a file called lab4.tgz in the directory. Change the file name to your student id:
xxxxxxxxxx% mv lab4.tgz lab4_[your student id].tgz
Then upload lab4_[your student id].tgz file to Canvas before the deadline.
You'll receive full credits if your code passes the same tests that we gave you, when we run your code on our machines.