Lab 4: Map Reduce on Fault-tolerant Distributed Filesystem

Getting started

Before starting this lab, please back up all of your prior labs' solutions.

(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.

Task 1

Task 2

Hints

Grading

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:

We will test your MapReduce following the evaluation criteria above.

Handin Procedure

After all above done:

That should produce a file called lab4.tgz in the directory. Change the file name to your student id:

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.