火龙果软件-MapReduce课件_第1页
火龙果软件-MapReduce课件_第2页
火龙果软件-MapReduce课件_第3页
火龙果软件-MapReduce课件_第4页
火龙果软件-MapReduce课件_第5页
已阅读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. 本站不保证下载资源的准确性、安全性和完整性, 同时也不承担用户因使用这些下载资源对自己和他人造成任何形式的伤害或损失。

评论

0/150

提交评论