Answered step by step
Verified Expert Solution
Link Copied!

Question

1 Approved Answer

MapReduce lab(JAVA) Your task is to analyze a large collection of 100 text files and compute the aggregate word count. Eg. suppose you have 2

MapReduce lab(JAVA)

Your task is to analyze a large collection of 100 text files and compute the aggregate word count.

Eg. suppose you have 2 text files:

file1.txt

A dog barks at the sun.

file2.txt

The sun rises over a village.

Then the aggregate word count is:

a -> 2
dog -> 1
barks ->1
sun->2

(so on and so forth)

Step 1

Use the text files provided in the archive. Download and unzip them in your project root.

Step 2

Use a single thread (main thread) to parse all the text files and create the aggregate word count (use a Map to store the word count.

Step 3

Modify the previous solution to parse the text files in parallel. Create multiple worker threads that each compute the word count for a subset of the text files (eg worker 1 computes for file1,2,3, worker 2 for file4,5,6....). After all workers finish their work the main thread collects their individual word count and aggregates it into a single word count (a single map).

Step by Step Solution

There are 3 Steps involved in it

Step: 1

blur-text-image

Get Instant Access to Expert-Tailored Solutions

See step-by-step solutions with expert insights and AI powered tools for academic success

Step: 2

blur-text-image

Step: 3

blur-text-image

Ace Your Homework with AI

Get the answers you need in no time with our AI-driven, step-by-step assistance

Get Started

Recommended Textbook for

Database Management With Website Development Applications

Authors: Greg Riccardi

1st Edition

0201743876, 978-0201743876

More Books

Students also viewed these Databases questions

Question

Explain the function and purpose of the Job Level Table.

Answered: 1 week ago