赞
踩
版本3.1.3
首先集群中创建目录(也可以直接执行-put它会自动帮你创建目录)
hadoop fs -mkdir /input
然后添加文件到目录中
hadoop fs -put word.txt /input
可以在HDFS的WEB上查看上传的文件是否成功
http://hadoop102:9870/explorer.html#/
执行wordcount的jar包参数为input路径和output路径
hadoop jar share/hadoop/mapreduce/hadoop-mapreduce-examples-3.1.3.jar wordcount /input /output
执行后可在103服务器上的ResourceManager WEB上查看进度
http://hadoop103:8088/cluster
最后可以在HDFS的WEB上查看结果,路径为命令执行的第二个参数/output
Copyright © 2003-2013 www.wpsshop.cn 版权所有,并保留所有权利。