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
Firstly you need to know the concept of MapReduce. It can be explained with the following diagram:
You can also refer the following video for more information regarding Mapreduce: