COMP5426_Parallel Program_2013 Semester 1_lecture06-13
University of Sydney_COMP5426_Parallel Program_2013 Semester 1
COMP5426 Parallel and Distributed Computing
MapReduce
University of Sydney_COMP5426_Parallel Program_2013 Semester 1
Data-Intensive ComputingData-Intensive
In data-intensive computing, the focus is on the data: problem areas include
Typically store data at datacenters Use compute nodes nearby Compute nodes run computation services
Storage Communication bottleneck Moving tasks to data (rather than vice-versa) Security Availability of Data Scalability
University of Sydney_COMP5426_Parallel Program_2013 Semester 1
What is MapReduce?MapReduce is a distributed/parallel computing framework introduced by Google to support computing on large data sets on clusters of computers. Originally used at Google, now widely used as a more general platform for data-intensive computing
University of Sydney_COMP5426_Parallel Program_2013 Semester 1
What is MapReduce?The framework is inspired by map and reduce functions commonly used in functional programming (although their purpose in the MapReduce framework is not the same as their original forms).
User implements map() and reduce() functions Runtime library takes care of EVERYTHING else
University of Sydney_COMP5426_Parallel Program_2013 Semester 1
What is MapReduce?A simple programming model that applies to certain large-scale data-intensive computing problems Hide messy details in MapReduce runtime library:
Improvements to core library benefit all users of library!
automatic parallelization load balancing network and disk transfer optimization handling of machine failures Robustness
University of Sydney_COMP5426_Parallel Program_2013 Semester 1
MotivationLarge Scale Data Processing
Want to process lots of data (> 1 TB) Want to parallelize across hundreds/thousands of CPUsHow to parallelize How to distribute How to handle failures
… Want to make this easy6
University of Sydney_COMP5426_Parallel Program_2013 Semester 1
Typical problem solved by MapReduceRead a lot of data Map: extract something you care about from each record Shuffle and Sort Reduce: aggregate, summarize, filter, or transform Write the results Outline stays the same, but map and reduce change to fit the problem7
University of Sydney_COMP5426_Parallel Program_2013 Semester 1
Programming ModelMap
Takes an input pair and produces a set of intermediate key/value pairs e.g., Map: (key1, value1) -> list(key2,value2)
The MapReduce library groups together all intermediate values associated with the same intermediate key Reduce
This function accepts an intermediate key and a set of values for that key Reduce: (key2,list(key2,value2)) -> value38
University of Sydney_COMP5426_Parallel Program_2013 Semester 1
Example: Counting WordsCounting words in a large set of documents: map()
Input<filename, file_text> Parses file and emits<word, count> pairs eg.<”hello”, 1>
reduce()
Sums all values for the same key and emits<word, TotalCount> eg.<”hello”, (3 5 2 7)>=><”hello”, 17>
University of Sydney_COMP5426_Parallel Program_2013 Semester 1
Example: Use of MapReducemap(string key, string value)//key: document name//value: document contents for each word w in value EmitIntermediate(w,“1”); reduce(string key, iterator values)//key: word//values: list of counts int results= 0; for each v in values result+= ParseInt(v); Emit(AsString(result));10
University of Sydney_COMP5426_Parallel Program_2013 Semester 1
Actual Source CodeThe example is written in pseudo-code Actual
implementation is in C++, using a MapReduce library True code is somewhat more involved (defines how the input key/values are pided up and accessed, etc.)
University of Sydney_COMP5426_Parallel Program_2013 Semester 1
ApplicationsStructure of the Web: Input is (URL, contents) Scan through the document's contents looking for links to other URLs Map outputs (URL, linked-to URL) you get a simple representation of the WWW“link graph” Map outputs (linked-to URL, URL) you get the reverse link graph,“what web pages link to me?” Map outputs (linked-to URL, anchor text) you get“how do other web pages characterize me?”12
University of Sydney_COMP5426_Parallel Program_2013 Semester 1
ApplicationsGoogle uses MapReduce for
Page indexing pipeline: What are all the pages that match this query? PageRank: What are the best pages that match this query? and more others
Greatly simplifies large-scale computations at Google13
University of Sydney_COMP5426_Parallel Program_2013 Semester 1
How MapReduce WorksUser to do list:
Write map() and reduce() functions indicate:
Input/output files M: number of map tasks R: number of reduce tasks W: number of machines
Submit the job
This requires no knowledge of parallel& distributed systems!! What about everything else?14
University of Sydney_COMP5426_Parallel Program_2013 Semester 1
The InfrastructureLarge clusters of commodity PCs and networking hardware Clusters consists of 100/1000s of machines (failures are common) GFS (Google File System)
Distributed file system Provides replication of the data
University of Sydney_COMP5426_Parallel Program_2013 Semester 1
Parallelismmap() functions run in parallel, creating different intermediate values from different input data sets reduce() functions also run in parallel, each working on a different output key All values are processed independently. Synchronization required between the two functions.
…… 此处隐藏:3345字,全部文档内容请下载后查看。喜欢就下载吧 ……相关推荐:
- [小学教育]四年级综合实践活动课《衣物的洗涤》教
- [小学教育]2014半年工作总结怎么写
- [小学教育]20世纪外国文学专题综合试题及答案
- [小学教育]TS_1循环使用催化丙烯环氧化反应研究
- [小学教育]最实用的考勤签到表(上下班签到表)
- [小学教育]气候与生态建筑——以新疆民居为例
- [小学教育]二人以上股东有限责任公司章程参考样本
- [小学教育]2014届第一轮复习资料4.1,3美好生活的
- [小学教育]土方开挖、降水方案
- [小学教育]手绘儿童绘本《秋天的图画》(蜡笔)
- [小学教育]2002级硕士研究生卫生统计学考试试题
- [小学教育]环保装备重点发展目录
- [小学教育]金蝶K3合并报表培训教材
- [小学教育]岩浆岩试题及参考答案
- [小学教育]知之深爱之切学习心得
- [小学教育]第十二章 蛋白质的生物合成
- [小学教育]Chapter 2-3 Solid structure and basi
- [小学教育]市政道路雨季专项施工方案
- [小学教育]中国海洋大学2012-2013学年第二学期天
- [小学教育]教育心理学第3章-学习迁移
- 浅谈深化国企改革中加强党管企业
- 2006年中国病理生理学会学术活动安排
- 设计投标工作大纲
- 基于ARP的网络攻击与防御
- 2016届湖北省七市(州)教科研协作体高三
- Google_学术搜索及其检索技巧
- 2019-2020学年七年级地理下册6.3美洲教
- 城市道路可研报告
- 【名师指津】2012高考英语 写作基础技
- 6级知识点培训北京师范大学《幼儿智趣
- 注册会计师会计知识点:金融资产
- 新安装 500 kV 变压器介损分析与判断
- PS2模拟器PCSX2设置及使用教程.
- 医院药事管理与药剂科管理组织机构
- {PPT背景素材}丹巴的醉人美景,免费,一
- NAS网络存储应用解决方案
- 青海省西宁市六年级上学期数学期末考试
- 测量管理体系手册依据ISO10012:2003
- 洞子小学培养骨干教师工作计划
- 浅谈《牛津初中英语》的教材特点及教学




