Giter Site home page Giter Site logo

mapreduce's Introduction

mapReduce

Andrew's implementation of MapReduce according to mapReduce paper

It is suppose to be running in distributed network. We simulate this by running multiple process on a single host.

Code Structure

/mr folder contains the implmenetation of mapReduce framework.

/main contains the programs that utilize the underlying mapReduce framework and some test cases.

  • To run testing, run ./test-mr.sh inside the main folder.

/mrapps contains bunch of user defined map reduce functions.

Fault Tolerant

If the master or coordinator failed, the whole MapReduce job will be re-run.

If a worker fails, the master/coordinator will be responsible for re-running the task.

  • If the task is a map task, we will re-run it even if it is in complete state because the underlying disk is not accessible.
  • If the task is a reduce task and it has not been completed yet, we will re-run it.

There mechanism used for checking if a worker is still alive is not the perfect solution, we simply check if each task has been completed within 10 seconds. If the task has not been completed yet, we re-assign the job to other workers.

Sample Testing

We can run the word count example described in the paper above for testing purpose.

  1. Go to the main directory, e.g. cd main
  2. To remove any previous outputs, run rm mr-out*
  3. To start the coordinator, run go run mrcoordinator.go pg-*.txt
  4. We need to build the wc.go program as plugin first, run go build -buildmode=plugin ../mrapps/wc.go
  5. Open a few other terminals to run some workers, run go run mrworker.go wc.so
  6. The output files are stored inside main/mr-out-<partitionNumber>

mapreduce's People

Contributors

xianchengz avatar

Watchers

 avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.