在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>
您可能感兴趣的文章:
如您对本文有疑问或者有任何想说的,请 点击进行留言回复,万千网友为您解惑!
网友评论