跳转至

6. 拓展-最高最低气温统计

1. 上传jar包和数据文件

# 有空做一个百度网盘链接在这里!!!
maxtemp.jar
temp.txt

2. 修改权限

chown centos.centos maxtemp.jar
chown centos.centos temp.txt

3. 数据文件temp.txt推送到hdfs

hdfs dfs -put temp.txt /

4. 测试

hadoop jar maxtemp.jar com.oldboy.mapreduce.maxtemp.MaxTempApp /temp.txt /out

5. 查看结果

hdfs dfs -cat /out/part-r-00000

最后更新: 2022-02-25 08:50:24