Answered step by step
Verified Expert Solution
Link Copied!

Question

1 Approved Answer

Assume, that a text file crime-stories.txt contain the texts of the large number of crime stories. Assume, that the file is formatted such that one

Assume, that a text file crime-stories.txt contain the texts of the large number of crime stories. Assume, that the file is formatted such that one statement is located in one line of the text file.
Assume, that a text file patterns.txt contains the text patterns, for example regular expressions. Assume, that the file is formatted, such that one pattern is located in one line of the text file.
To simplify the problem, assume that all text patterns in a file patterns.txt are distinct. Finally, assume that a function match(text-line, text-pattern) returns true when text line matches a pattern text-pattern. Otherwise, the function returns false.


Your task is to explain how to implement a MapReduce application, that for each text pattern in a file patterns.txt finds the total number of statements in a file crime-stories.txt that match the pattern.
You must specify the parameters (if any) of your application and the key-value data in the input and output of the Map and Reduce stages.
There is no need to write Java code, however, if you like it then it is all right to do so. The precise explanations in plain English or in a pseudocode will do. Please note, that if you decide to use pseudocode then your explanations must precisely explain what happens at each stage of Map- Reduce application

Step by Step Solution

There are 3 Steps involved in it

Step: 1

So to implement a MapReduce application that finds the total number of statements in a file crimestoriestxt that match each pattern in patternstxt you ... 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

Income Tax Fundamentals 2013

Authors: Gerald E. Whittenburg, Martha Altus Buller, Steven L Gill

31st Edition

1111972516, 978-1285586618, 1285586611, 978-1285613109, 978-1111972516

More Books

Students also viewed these Computer Network questions