Hadoop示范程序WordCount运行及详解
发布时间: 2012-09-23 10:28:11 作者: rapoo
Hadoop示例程序WordCount运行及详解
?最近在学习云计算,研究Haddop框架,费了一整天时间将Hadoop在Linux下完全运行起来,看到官方的map-reduce的demo程序WordCount,仔细研究了一下,算做入门了。
?
运行方法:
假设:
Administrator@china-26d105f11 /cygdrive/e/hadoop/run$ bin/hadoop fs -ls /home/darren/wordcount/input/ls: Cannot access /home/darren/wordcount/input/: No such file or directory.Administrator@china-26d105f11 /cygdrive/e/hadoop/run$ ls /home/darren/wordcount/input/file01 file02Administrator@china-26d105f11 /cygdrive/e/hadoop/run$ cat /home/darren/wordcount/input/file01hello world bye worldAdministrator@china-26d105f11 /cygdrive/e/hadoop/run$ vi /home/darren/wordcount/input/file01Administrator@china-26d105f11 /cygdrive/e/hadoop/run$ cat /home/darren/wordcount/input/file01hello world bye worldtestAdministrator@china-26d105f11 /cygdrive/e/hadoop/run$