hadoop2.7.5安装使用(二)

hdfs进行测试wordcount

/opt/modules/hadoop-2.7.5/bin

./hadoop查看帮助

./hadoop fs 查看帮助

创建目录

hadoop fs -mkdir /wc/

hadoop fs -mkdir /wc/input

hadoop fs -ls -R /查看目录

放入测试文件

hadoop fs -put /opt/modules/hadoop-2.7.5/etc/hadoop/*.xml /wc/input/

查看

hadoop fs -ls -R /wc/input/

hadoop jar /opt/modules/hadoop-2.7.5/share/hadoop/mapreduce/hadoop-mapreduce-examples-2.7.5

.jar wordcount /wc/input /wc/output

查看结果

hadoop fs -ls /wc/output

hadoop fs -cat /wc/output1/part-r-00000

http://192.168.0.31:8088/

http://192.168.0.31:8042

http://192.168.0.31:50070

猜你喜欢

转载自blog.csdn.net/weixin_42296389/article/details/80607659