β

hadoop 运行wordcount 例子

Waiting For You 4 阅读
#创建几个目录
hadoop fs -mkdir /user/
hadoop fs -mkdir /user/walle
hadoop fs -mkdir /user/walle/wordcount
#把本地文件拷贝到dfs里
hadoop dfs -copyFromLocal ./inputText.txt /user/walle/wordcount
#运行,注意output3目录不用创建
hadoop jar /usr/local/Cellar/hadoop/3.1.0/libexec/share/hadoop/mapreduce/hadoop-mapreduce-examples-3.1.0.jar wordcount /user/walle/wordcount/inputText.txt /user/walle/wordcount/output3

hadoop fs -cat /user/walle/wordcount/output3/part-r-00000 用这个来查看结果

http://www.waitingfy.com/archives/3993

作者:Waiting For You
记录一些关于android,cocos2d-x,objective-c,mfc,directX,c++,数学的东西
原文地址:hadoop 运行wordcount 例子, 感谢原作者分享。

发表评论