




已阅读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. 本站不保证下载资源的准确性、安全性和完整性, 同时也不承担用户因使用这些下载资源对自己和他人造成任何形式的伤害或损失。
最新文档
- 全球宠物市场洞察之泰国篇:本土与出口市场双扩张中国品牌布局正启航402mb
- 弥漫性食管痉挛的临床护理
- 2025年门诊部年度工作总结模版
- 角弓反张的临床护理
- 暑期招生美术培训方案大纲
- 圆锥曲线公式总结模版
- 高血压防治与管理要点
- 四川省成都市温江区第二区2025年数学七下期末质量跟踪监视模拟试题含解析
- 护肤培训年终工作总结与展望
- 抗菌药物培训考核试题及答案
- 文化产品创意与策划-终结性考核-国开(SC)-参考资料
- 《骆驼祥子》中“虎妞”形象分析6200字(论文)
- 《质量管理体系国家注册审核员预备知识培训教程》
- 2024年5月26日河南省事业单位联考《公共基础知识》试题
- 儿歌大全100首歌词
- 粮油食材配送投标方案(大米食用油食材配送服务投标方案)(技术方案)
- 2024年江西省高考物理+化学+生物试卷(真题+答案)
- 个人独资企业(合伙企业)转型有限责任公司登记申请书
- 2023年湖南省普通高等学校对口招生考试机电类专业综合知识试题附答题卡
- 医院用工合同医院用工合同书(2024版)
- 车辆顶账协议书范文
评论
0/150
提交评论