Hi Anup,
Try the following simple wordcount program to
test your environment -
1. Please start the hadoop services - start-dfs.sh
2. Please start the yarn services - start-yarn.sh
3. Create a input directory
$ hadoop fs -mkdir /user/hadoop/input
-- If it will give you error that directory not found-Create the parent directory first
4. Upload the input file
$ hadoop fs -put $HADOOP_INSTALL/LICENSE.txt /user/hadoop/input/License
5. Use the hadoop example jar available with hadoop installation package to run the code
$ hadoop jar $HADOOP_INSTALL/share/hadoop/mapreduce/hadoop-mapreduce-examples-2.6.0.jar wordcount /user/hadoop/input/License /home/hadoop/Output
Note:- Define the input file and output directory based on your system/OS