Back
Word count MapReduce is probably the first code everyone tries after installing Hadoop, so before I get into code, you want to make sure that you already have a file in HDFS which will serve as out input, if you don’t take help in getting the requisites done.
Now, we must know what will our code perform, the wordcount reads text files and counts the frequency of the words in the text file. Each mapper takes a line of the input text file as ‘input’ and breaks it down into the words.
Coming onto the code, you can find it in the link below
https://hadoop.apache.org/docs/current/hadoop-mapreduce-client/hadoop-mapreduce-client-core/MapReduceTutorial.html
Firstly you need to know the concept of MapReduce. It can be explained with the following diagram:
Traditional Way:
MapReduce Way:
You can also refer the following video for more information regarding Mapreduce:
31k questions
32.8k answers
501 comments
693 users