需求:在一堆给定的文本文件中统计输出每一个单词出现的总次数
Step1.数据格式准备
1.创建一个新的文件
cd /export/serves
vim wordcount.txt
2.向其中放入以下内容并保存
hello,world,hadoop
hive,sqoop,flume,hello
kitty,tom,jerry,world
hadoop
3.上传到HDFS
hdfs dfs -mkdir /wordcount/
hdfs dfs -put wordcount.txt /wordcount/