Question: Consider a classical MapReduce application that counts the total number of occurrences of words in a given text. For example, look at WordCount application WordCount.java.

Consider a classical MapReduce application that counts the total number of occurrences of words in a given text. For example, look at WordCount application WordCount.java.
Assume the following classification of words depending on the length of each word.
very short: 1<= length <=3
short: 4<= length <=5
medium: 6<= length <=8
long: 9<= length <=12
X long: 13<= length <=15
XX long: 16<= length
Extend Java code of the application such that it counts in a given text the total number of words in each category. For example, the distribution of words in a text that consists of 90 words could be the following.
X short: 10 words
short: 15 words
medium: 35 words
long: 20 words
X long: 10 words
XX long: 0 words
Save your solution in a file solution3.java.
When ready, compile, create jar file, and process your application. To test your application, you can use a file grep.txt included. Display the results created by the application. When finished, Copy and Paste the messages from a Terminal screen into a file solution3.pdf.

Step by Step Solution

There are 3 Steps involved in it

1 Expert Approved Answer
Step: 1 Unlock blur-text-image
Question Has Been Solved by an Expert!

Get step-by-step solutions from verified subject matter experts

Step: 2 Unlock
Step: 3 Unlock

Students Have Also Explored These Related Programming Questions!