Hadoop入门---(wordcount)统计单词出现的次数

157 阅读1分钟

wordcount

1、创建输入文件目录

在hadoop安装目录下创建wcinput目录,如我的安装目录是:/opt/module/hadoop-2.7.7

[root@hadoop101 hadoop-2.7.7]# pwd
/opt/module/hadoop-2.7.7
[root@hadoop101 hadoop-2.7.7]# 
[root@hadoop101 hadoop-2.7.7]# 
[root@hadoop101 hadoop-2.7.7]# mkdir wcinput

2、创建数据源

[root@hadoop101 wcinput