1 cd /home/chenyong/paper/hadoop-1.1.2

2 mkdir input
 cd input
 echo "hello world !" > test1.txt
 echo "hello hadoop" > test2.txt
 echo "hello redhat" > test3.txt

3 ./bin/hadoop dfs -put input /in/*将input目录复制到hdfs根目录下,重命名为in,执行前out目录必须为空*/
 ./bin/hadoop jar hadoop-examples-1.1.2.jar wordcount /in /out
 ./bin/hadoop dfs -get /out output
 cat output/*显示结果*/

 posted on 2013-06-27 11:08  Chenyong Liu  阅读(128)  评论(0编辑  收藏  举报