1. 在hdfs上创建/wordcount/input
hdfs dfs -mkdir /wordcount/input
2. 将需要进行数据处理的.txt或.csv文件上传至/input
hdfs dfs -put /opt/f.txt /wordcount/input
3. 上传打包好的MapReduce的jar包上传至/input
hdfs dfs -put /opt/MR.jar /wordcount/input
4. 在hdfs上创建/wordcount/output
hdfs dfs -mkdir /wordcount/output
5. 使用命令运行MapReduce的jar包
hadoop jar MR.jar /wordcount/input /wordcount/output/
6. 查看统计出来的结果
hadoop fs -cat /wordcount/output/part-r-00000