在hadoop2.3下运行WordCount程序
1、如果hdfs没有启动,则在haoop主目录下启动: ./sbin/start-dfs.sh ./sbin/start-yarn.sh 2、查看状态,保证有数据节点在运行 ./bin/hdfs dfsadmin -report 看到如下状态表示一切正常 Datanodes available: 1 (1 total, 0 dead) 这一步也可以用浏览器查看:http://localhost:50070 3、新建几个数据文件,如file1.txt,file2.txt,我是放到hadoop主目录下的examples目录里 examples/file1.txt 内容如下: hello www.isosee.com hello www.pmi.org.cn hello