hadoop2.6.4运行wordcount
hadoop用户登录,启动服务:
start-dfs.sh && start-yarn.sh
创建输入目录:
hadoop df -mkdir /input
把测试文件导入/input目录:
hadoop fs -put /usr/hadoop-2.6.4/etc/hadoop/*.xml /input
查看复制来的文件:
hadoop fs -ls /input
效果:
运行wordcount示例程序:
hadoop jar share/hadoop/mapreduce/hadoop-mapreduce-examples-2.6.4.jar wordcount /input/ /output/wordcount
运行比较耗资源(在虚拟机里)。几分钟后,运行完成:
查看输出结果: