Question: Run this example on the poems data in our Hadoop server Change the code to count how many words of different lengths are in the

Run this example on the poems data in our Hadoop server

Change the code to count how many words of different lengths are in the poems data.

Note that for this problem, the map function should output a pair with the format and with examples or , or similar. The reduce function should stay the same because it will only count the different lengths.

To get the length of a string theWord in Java you need to use the function theWord.length(). For more information, visit: http://docs.oracle.com/javase/1.5.0/docs/api/java/lang/String.html (Links to an external site.)Links to an external site..

Note: to run these examples, you should follow the tutorial in the previous lesson by creating a new folder for each jb, then copying and pasting the new code, compiling, and running the jobs.

Submit your code and results as a screenshot.

PreviousNext

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 Databases Questions!