hadoop1.1.2中wordCount详情
程序员文章站
2022-06-24 20:31:45
wordcount类
在hadoop-1.1.2/hadoop-examples-1.1.2.jar中 命令
mkdir input
..
vim /inp...
wordcount类
在hadoop-1.1.2/hadoop-examples-1.1.2.jar中 命令
< hadoop 1>
< fine 1>
< find 1>
< hello 1>
< hello 1>
< hello 1>
< hadoop 1>
< fine 1>
< find 1>
< hello 1 1>
< hadoop 1>
< fine 1 1>
< hello 2>
< hadoop 1>
< fine 1>
在hadoop-1.1.2/hadoop-examples-1.1.2.jar中 命令
mkdir input .. vim /input/test //文件中内容: /** * hello hadoop * fine fine hello **/ hadoop fs -mkdir -p /class/input hadoop fs -put test /class/input/ hadoop jar hadoop-examples-1.1.2.jar wordcount hdfs://hadoop:9000/class/input/text hdfs://hadoop:9000/class/input/out11 //查看结果 hadoop fs -cat /calss/input/out11/part-r-00000
大致过程:
word : < hello 1>< hadoop 1>
< fine 1>
< find 1>
< hello 1>
< hello 1>
< hello 1>
< hadoop 1>
< fine 1>
< find 1>
< hello 1 1>
< hadoop 1>
< fine 1 1>
< hello 2>
< hadoop 1>
< fine 1>
上一篇: ios开发学习之数据组件介绍