栏目分类:
子分类:
返回
名师互学网用户登录
快速导航关闭
当前搜索
当前分类
子分类
实用工具
热门搜索
名师互学网 > IT > 前沿技术 > 云计算 > 云平台

mapreduce在hdfs上运行计算(已打包好jar之后)

云平台 更新时间: 发布时间: IT归档 最新发布 模块sitemap 名妆网 法律咨询 聚返吧 英语巴士网 伯小乐 网商动力

mapreduce在hdfs上运行计算(已打包好jar之后)

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

转载请注明:文章转载自 www.mshxw.com
本文地址:https://www.mshxw.com/it/896107.html
我们一直用心在做
关于我们 文章归档 网站地图 联系我们

版权所有 (c)2021-2022 MSHXW.COM

ICP备案号:晋ICP备2021003244-6号