欢迎您访问程序员文章站本站旨在为大家提供分享程序员计算机编程知识!
您现在的位置是: 首页

MIT 6.824 Lab1 MapReduce实现 2020 Spring

程序员文章站 2022-03-15 17:09:19
...

一、环境准备

  • 1.Linux系统
  • 2.Go环境的安装

二、准备实验的代码

通过课程地址获取 https://pdos.csail.mit.edu/6.824/labs/lab-mr.html

$ git clone git://g.csail.mit.edu/6.824-golabs-2020 6.824
$ cd 6.824
$ ls
Makefile src

三、学习go语言

  1. Linux下配置Golang开发环境
  2. mapreduce阅读笔记

三、实验准备工作

  • 题目提供的资料:We supply you with a simple sequential mapreduce implementation in src/main/mrsequential.go. It runs the maps and reduces one at a time, in a single process. We also provide you with a couple of MapReduce applications: word-count in mrapps/wc.go, and a text indexer in mrapps/indexer.go. You can run word count sequentially as follows:
    在src/main/mrsequential.go中提供了串行mapreduce的实现,mrapps/wc.go中给了统计单词的实现。可以通过如下方式使用
$ cd src/main
$ go build -buildmode=plugin ../mrapps/wc.go
$ rm mr-out*
$ go run mrsequential.go wc.so pg*.txt
$ more mr-out-0
A 509
ABOUT 2
ACT 8
...

mrsequential.go leaves its output in the file mr-out-0. The input is from the text files named pg-xxx.txt.
测试结果
MIT 6.824 Lab1 MapReduce实现 2020 Spring

相关标签: mit6.824 分布式