Giter Site home page Giter Site logo

mapreduce's Introduction

参考http://oserror.com/distributed/mapreduce-implementation-in-golang/?utm_source=tuicool&utm_medium=referral 这篇文章 , 把它从单机版本, 改成了多机分布式版本.(单master, 多worker)

主要流程是:

  1. master接收数据分片, 下发文件路径给map worker

  2. map worker根据路径向master获取分片数据, 以分片文件名保存到本地

  3. 每次map worker计算完数据后, 将本地的结果中间文件路径注册到master中

  4. reduce worker向master查询map结果中间文件所有的map worker路径. 然后向map worker获取中间结果文件.

  5. reduce worker处理完数据后, 将本地的结果文件路径再汇报给master

  6. master在合并文件时, 向所有的reduce worker索要结果文件, 下载到本地, 执行合并

功能比较low, 就图个好玩哈.

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.