PROFESSIONAL ACADEMIC STUDY RESOURCES WEBSITE +1 813 434 1028  proexpertwritings@hotmail.com

Hadoop

Description

  1. Run the example on the poems data in our Hadoop server.
  2. 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 <key, value> pair with the format <Text, IntWritable> and with examples <”Length 8”, 1> or <”Length 7”, 1>, 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.htmlLinks 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.
Share your love

Newsletter Updates

Enter your email address below and subscribe to our newsletter

Leave a Reply

Your email address will not be published. Required fields are marked *