厦门大学数据库实验室mapreduce连接优化内容摘要:
前一步生成的键值对生成最后的相似性连接结果。 该算法充分利用了相似性连接的特点,过滤掉不可能成为最终结果的数据,提高了查询效率,但应用范围只限于文本字符串的相似性连接。 相似度连接算法 ① 数据统计与全局词项排序 ② b第二阶段用 teardown function在内存中排序 相似度连接算法 ① 前缀过滤 ② A属于 X组, B、 G属于 Y组,C、 D属于 Z组 相似度连接算法 ① 前缀过滤 ② A属于 X组, B、 G属于 Y组,C、 D属于 Z组 ③ 根据前一步生成的键值对生成最后的相似性连接结果 把第一阶段产生的结果广播给每个map 多表连接 在数据库应用领域中,经常需要对多个表进行连接操作,比较有代表性的是星型连接与链式连接。 星型连接:在数据仓库应用中 ,星型模式是最常用的数据表示模型 ,包括一个事实表和多个维表 . 链式连接: 星型连接 事实表 LINEORDER和 4个维表 CUSTOMER、 SUPPLIER、 PART和 的 OLAP查询中 ,涉及最多的操作就是维表和事实表的连接 ,又被称为星型连接 .星型连接返回连接的全部结果 ,是 OLAP查询中代价最高的操作之一 . 例 1. SELECT* FROM LineorderF,CustomerC,SupplierS,PartP,DateD WHERE = and = and = and = ORDER BY ++++ STOP AFTER k。 多表等值连接算法 wele to use these PowerPoint templates, New Content design, 10 years experience 算法简介 该算法的基本思想是,对于每一个连接属性,都有一个对应的共享值表示这个属性进行 Hash 后的桶数, Map 输出的 keyintermediate/valueintermediate对需要传到该表没有包含的属性对应的每个 Hash值中,因此复制的数量由该表没有包含的连接属性所对应的共享值之积所决定。 在 Reduce阶段,每个 Reducer将传到该节点的各表的数据进行连接,形成最终结果。 随着表数的增加,应用这种算法产生的中间传输数据量将急剧增加,因此比较适合用于星型连接与表数不太多的链式连接。 多表等值连接算法 • Suppose that the target number of mapkeys is k. That is, we shall use k Reduce processes to join tuples from the three relations. Each of the three attributes A, B, and C will have a share of the key, which we denote a, b, and c, assume there are hash functions that map values of attribute A to a different buckets, values of B to b buckets,and values of C to c buckets. • Consider tuples (x,y) in relation R. Which Reduce processes need to know about this tuple? Recall that each Reduce process is associated with a mapkey (u, v,w), where u is a hash value in the range 1 to a, representing a bucket into which Avalues are hashed. Similarly, v is a bucket in the range 1 to b representing a Bvalue, and w is a bucket in the range 1 to c representing a Cvalue. Tuple ex。 yT from Rcan only be useful to this reducer if hexT ?u and heyT ?v. However, it could be useful to any reducer that has these first two key ponents, regardless of the value of w. We conclude tha。厦门大学数据库实验室mapreduce连接优化
阅读剩余 0%
本站所有文章资讯、展示的图片素材等内容均为注册用户上传(部分报媒/平媒内容转载自网络合作媒体),仅供学习参考。
用户通过本站上传、发布的任何内容的知识产权归属用户或原始著作权人所有。如有侵犯您的版权,请联系我们反馈本站将在三个工作日内改正。