New Case Study:See how Anthropic automated 95% of dependency reviews with Socket.Learn More
Socket
Sign inDemoInstall
Socket

github.com/you06/map-reduce-task

Package Overview
Dependencies
Alerts
File Explorer
Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

github.com/you06/map-reduce-task

  • v0.0.0-20210712103729-910b0a2a5bfa
  • Source
  • Go
  • Socket score

Version published
Created
Source

Map Reduce Task

中文版

Task

In this task, you need to complete a map-reduce workflow and simulate it in a single process.

Suppose we have an extremely large file with words seperated by space in it, e.g., 100GB, which is not able to loaded into RAM memory. Your task is to find the first non-repeat word. There are basic following rules.

  • Only allow scan the text file once
  • Use less IO operation as possible
  • RAM limitation is 16G
  • The implementation must be stable, in another word, even missing the first non-repeat word in a very low probability is not allowed.

There is a basic framework and a test data generator. In your implementation, there are some additional rules.

  • Your code which read files must be under datanode directory
  • Your code which collect the middle result or final result must be placed under calcnode directory
  • Each node must run in individual goroutine
  • Data exchange between node instances must be through channels

It would be bonus if there is a data exchange format which supports serialization and deserialization in your implementation.

The RAM limitation is for single node, you don't need to care the total memory usage when simulate in a single machine.

Guide

To do this task, you may go through the following steps.

  • Fork this repository to your account
  • Work on the tasks
  • Send a pull request to this repo, we will review your work

FAQs

Package last updated on 12 Jul 2021

Did you know?

Socket

Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.

Install

Related posts

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc