Map/Reduce Assignment Build a Map/Reduce system using the following two classes: 1. Map class This class should contain: - a private ArrayList - a public method map(), which should tokenize...



Map/Reduce Assignment


Build a Map/Reduce system using the following two classes:


1. Map class


This class should contain:


- a private ArrayList


- a public method map(), which should tokenize workshop.txt into its words, each of which will be inserted into the Arraylist (duplicates are allowed). Beware to strip from each word any commas or dots.


- a public method getList() to return the ArrayList (getter)



2. Reduce class


This class should contain:


- a private Hashtable


- a public method reduce(ArrayList), which



(a) should load all the tokens of the ArrayList, passed as argument, into the Hashtable,



(b) should count the number of times (count) each token appears in the ArrayList, and store each count in the Hashtable ,



(c) should create a text file, which will contain each token and its count, e.g., author: 15. Each line of the text file should contain one such tuple.



The Reduce class should host the main part, which will drive the workflow of the application.


Deliver a technical report (pdf file) with snippets of code and adequate justification of your design choices.


May 28, 2021
SOLUTION.PDF

Get Answer To This Question

Related Questions & Answers

More Questions »

Submit New Assignment

Copy and Paste Your Assignment Here