第50课:HadoopMapReduce倒排索引解析与实战

本文介绍了如何使用Hadoop MapReduce实现倒排索引,通过示例展示了数据处理过程,包括Map、Combiner和Reduce阶段,并提供了运行结果和源代码。通过这个例子,读者可以理解倒排索引的工作原理及其在大数据处理中的应用。
摘要由CSDN通过智能技术生成

1数据文件

[root@master invertedindex]#cat file1.txt
Spark is so powerful
[root@master invertedindex]#cat file2.txt
Spark is the most exciting thing happening in big data today
[root@master invertedindex]#cat file3.txt
Hello Spark Hello again Spark
[root@master invertedindex]#

 

2、运行结果

[root@master invertedindex]# hadoop dfs -cat /library/outputinvertedindex4/part-r-00000
DEPRECATED: Use of this script to execute hdfs command is deprecated.
Instead use the hdfs command for it.

16/02/23 08:51:13 WARN util.NativeCodeLoader: Unable to load native-hadoop library for your platform... using builtin-java classes where applicable
Hello   file3.txt:2
Spark   file3.txt:2;file1.txt:1;

评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包

打赏作者

段智华

你的鼓励将是我创作的最大动力

¥1 ¥2 ¥4 ¥6 ¥10 ¥20
扫码支付:¥1
获取中
扫码支付

您的余额不足,请更换扫码支付或充值

打赏作者

实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值