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
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
Get step-by-step solutions from verified subject matter experts
