运行hadoop自带wordcount实例
sbin/start-dfs.sh
jps
bin/hdfs dfs -ls /
bin/hadoop dfsadmin -safemode leave 关闭安全模式
//在HDFS上创建输入文件夹
bin/hadoop fs -mkdir /data/wordcount
//上传本地/home/zjp/test/中的文件到集群的/data/wordcount目录下
bin/hdfs dfs -put /home/zjp/test/ztest2.txt /data/wordcount
bin/hdfs dfs -ls /data/wordcount
//运行hadoop自带实例wordcount
bin/hadoop jar share/hadoop/mapreduce/hadoop-mapreduce-examples-2.7.7.jar wordcount /data/wordcount/ztest2.txt /home/zjp/test/out
bin/hdfs dfs -ls /home/zjp/test
bin/hdfs dfs -ls /home/zjp/test/out
bin/hadoop fs -cat /home/zjp/test/out/part-r-00000