已阅读5页,还剩24页未读, 继续免费阅读
版权说明:本文档由用户提供并上传,收益归属内容提供方,若内容存在侵权,请进行举报或认领
文档简介
MapReduce课件 Outline MapReduceoverviewDiscussionQuestionsMapReduce Motivation 200 processors200 terabytedatabase1010totalclockcycles0 1secondresponsetime5 averageadvertisingrevenue From www cs cmu edu bryant presentations DISC FCRC07 ppt Motivation LargeScaleDataProcessing Wanttoprocesslotsofdata 1TB Wanttoparallelizeacrosshundreds thousandsofCPUs Wanttomakethiseasy GoogleEarthuses70 5TB 70TBfortherawimageryand500GBfortheindexdata From MapReduce Automaticparallelization distributionFault tolerantProvidesstatusandmonitoringtoolsCleanabstractionforprogrammers ProgrammingModel BorrowsfromfunctionalprogrammingUsersimplementinterfaceoftwofunctions map in key in value out key intermediate value listreduce out key intermediate valuelist out valuelist map Recordsfromthedatasource linesoutoffiles rowsofadatabase etc arefedintothemapfunctionaskey valuepairs e g filename line map producesoneormoreintermediatevaluesalongwithanoutputkeyfromtheinput reduce Afterthemapphaseisover alltheintermediatevaluesforagivenoutputkeyarecombinedtogetherintoalistreduce combinesthoseintermediatevaluesintooneormorefinalvaluesforthatsameoutputkey inpractice usuallyonlyonefinalvalueperkey Parallelism map functionsruninparallel creatingdifferentintermediatevaluesfromdifferentinputdatasetsreduce functionsalsoruninparallel eachworkingonadifferentoutputkeyAllvaluesareprocessedindependentlyBottleneck reducephasecan tstartuntilmapphaseiscompletelyfinished Example Countwordoccurrences map Stringinput key Stringinput value input key documentname input value documentcontentsforeachwordwininput value EmitIntermediate w 1 reduce Stringoutput key Iteratorintermediate values output key aword output values alistofcountsintresult 0 foreachvinintermediate values result ParseInt v Emit AsString result Example Page1 theweatherisgoodPage2 todayisgoodPage3 goodweatherisgood Mapoutput Worker1 the1 weather1 is1 good1 Worker2 today1 is1 good1 Worker3 good1 weather1 is1 good1 ReduceInput Worker1 the1 Worker2 is1 is1 is1 Worker3 weather1 weather1 Worker4 today1 Worker5 good1 good1 good1 good1 ReduceOutput Worker1 the1 Worker2 is3 Worker3 weather2 Worker4 today1 Worker5 good4 SomeOtherRealExamples TermfrequenciesthroughthewholeWebrepositoryCountofURLaccessfrequencyReverseweb linkgraph ImplementationOverview Typicalcluster 100s 1000sof2 CPUx86machines 2 4GBofmemoryLimitedbisectionbandwidthStorageisonlocalIDEdisksGFS distributedfilesystemmanagesdata SOSP 03 Jobschedulingsystem jobsmadeupoftasks schedulerassignstaskstomachinesImplementationisaC librarylinkedintouserprograms Architecture Execution TaskGranularity Finegranularitytasks manymoremaptasksthanmachinesMinimizestimeforfaultrecoveryBetterdynamicloadbalancingOftenuse200 000map 5000reducetasksw 2000machines Locality Masterprogramdividesuptasksbasedonlocationofdata AsksGFSforlocationsofreplicasofinputfileblocks triestohavemap tasksonsamemachineasphysicalfiledata oratleastsamerack Effect Thousandsofmachinesreadinputatlocaldiskspeed FaultTolerance Onworkerfailure DetectfailureviaperiodicheartbeatsRe executecompletedandin progressmaptasksRe executeinprogressreducetasksTaskcompletioncommittedthroughmasterMasterfailure Couldhandle butdon tyet masterfailureunlikely Robust lost1600of1800machinesonce butfinishedfine Optimizations Noreducecanstartuntilmapiscomplete Asingleslowdiskcontrollercanrate limitthewholeprocessMasterredundantlyexecutes slow moving maptasks usesresultsoffirstcopytofinish onefinishesfirst wins Whyisitsafetoredundantlyexecutemaptasks Wouldn tthismessupthetotalcomputation SlowworkerssignificantlylengthencompletiontimeOtherjobsconsumingresourcesonmachineBaddiskswithsofterrorstransferdataveryslowlyWeirdthings processorcachesdisabled Optimizations Combiner functionscanrunonsamemachineasamapperCausesamini reducephasetooccurbeforetherealreducephase tosavebandwidth Performance Testsrunonclusterof1800machines 4GBofmemoryDual processor2GHzXeonswithHyperthreadingDual160GBIDEdisksGigabitEthernetpermachineBisectionbandwidthapproximately100Gbps Twobenchmarks MR GrepScan1010100 byterecordstoextractrecordsmatchingararepattern 92Kmatchingrecords MR SortSort1010100 byterecords modeledafterTeraSortbenchmark MR Grep Localityoptimizationhelps 1800machinesread1TBofdataatpeakof 31GB sWithoutthis rackswitcheswouldlimitto10GB sStartupoverheadissignificantforshortjobs MR Sort BackuptasksreducejobcompletiontimesignificantlySystemdealswellwithfailures Normal NoBackupTasks 200processeskilled MoreandmoreMapReduce MapReduceProgramsInGoogleSourceTree Exampleuses distributedgrepdistributedsortweblink graphreversalterm vectorperhostwebaccesslogstatsinvertedindexconstructiondocumentclusteringmachinelearningstatisticalmachinetranslation MapReduceConclusions MapReducehasproventobeausefulabstractionGr
温馨提示
- 1. 本站所有资源如无特殊说明,都需要本地电脑安装OFFICE2007和PDF阅读器。图纸软件为CAD,CAXA,PROE,UG,SolidWorks等.压缩文件请下载最新的WinRAR软件解压。
- 2. 本站的文档不包含任何第三方提供的附件图纸等,如果需要附件,请联系上传者。文件的所有权益归上传用户所有。
- 3. 本站RAR压缩包中若带图纸,网页内容里面会有图纸预览,若没有图纸预览就没有图纸。
- 4. 未经权益所有人同意不得将文件中的内容挪作商业或盈利用途。
- 5. 人人文库网仅提供信息存储空间,仅对用户上传内容的表现方式做保护处理,对用户上传分享的文档内容本身不做任何修改或编辑,并不能对任何下载内容负责。
- 6. 下载文件中如有侵权或不适当内容,请与我们联系,我们立即纠正。
- 7. 本站不保证下载资源的准确性、安全性和完整性, 同时也不承担用户因使用这些下载资源对自己和他人造成任何形式的伤害或损失。
最新文档
- 《心理障碍与精神卫生》习题二
- 医院感染知识考试试题及答案
- 消防春节安全教育课件
- 大学跳绳活动策划方案
- 人事安全讲堂课件
- 高中生校园安全班会课件
- 建筑设计规范与法规知识竞赛题集及答案解析
- 急救自救技能测试题及答案手册
- 科学探索之旅科学知识测试题及答案解析
- 科学探索谜题测试及答案手册
- GB/T 44193-2024全国一体化政务服务平台一网通办基本要求
- 手术室竞选护士长
- 学校食堂冰箱清洗、除霜记录
- 叠加定理课件
- 公共政策导论全套教学课件
- 2024年青海电工考试题库电工高级工考试题库(全国通用)
- 保险行业职业生涯规划总结
- 寺禅文化传承发展生态园项目实施方案
- 胆道梗阻的护理与处理
- 中国现当代文学史-13贾平凹的文学地理
- 大数据与会计专业职业生涯规划书2700字数
评论
0/150
提交评论