1、在hadoop-2.9.2目录下新建一个wcinput:mkdir wcinput
2、在wcinput下新建一个文件:touch wc.input
3、vim wc.input,在wc.input中输入:
hadoop yarn
hadoop mapreduce
gong
gong
4、回到hadoop-2.9.2目录下,输入:hadoop jar share/hadoop/mapreduce/hadoop-mapreduce-examples-2.9.2.jar wordcount wcinput wcoutput
5、查看结果
原文链接:/hadoop/991126.html