Faculty of Science and Information Technology > Software Engineering

how to run mapreduce program in Hadoop

(1/1)

allayear:
How to run MapReduce
---------------------------------


Step1: Put the text file on Hadoop HDFS(here,"/home/hadoop1/wordcountFile /"This is text file name with directory).
$hadoop dfs -put /home/hadoop1/wordcountFile /

Step2: give location to hadoop (jar file, packagenaem.ClassName /file Name Output Folder)
$hadoop jar /home/hadoop1/DemoMapReduce.jar PackageDemo.WordCount /wordcountFile1 OutPutFile

setp3: view the output folder
$hadoop fs -ls OutPutFile1

step4: view the Result
$hadoop fs -cat OutPutFile1/part-r-00000


Navigation

[0] Message Index

Go to full version