ArchitectureforBigDataOrca一个处理大数据的模块化的_第1页
ArchitectureforBigDataOrca一个处理大数据的模块化的_第2页
ArchitectureforBigDataOrca一个处理大数据的模块化的_第3页
ArchitectureforBigDataOrca一个处理大数据的模块化的_第4页
ArchitectureforBigDataOrca一个处理大数据的模块化的_第5页
已阅读5页,还剩12页未读 继续免费阅读

下载本文档

版权说明:本文档由用户提供并上传,收益归属内容提供方,若内容存在侵权,请进行举报或认领

文档简介

Orca:AModularQueryOptimizerArchitectureforBigData

Orca:一个处理大数据的模块化的查询优化体系Sigmod2014报告人万丽蓉研究背景InthispaperwepresentthearchitectureofOrca,thenewqueryoptimizerforallPivotal(Pivotal公司)datamanagementproducts,includingPivotalGreenplumDatabase(GPDB)andPivotalHAWQ.GPDBarchitectureGPDBarchitecture工作原理储存和处理如此大量的数据是通过将负载分布到几个独立的服务器或主机,创建一系列个体数据库,一起协作,提供一个单一的数据库映像。主管服务器(mastersevers)是GPDB的入口,也就是用户连接数据库提交SQL语句的地方。主管服务器负责协调与其他数据库实例共同工作,处理和存储数据。每一个数据库实例成为一个segment。当一个查询被提交给主管服务器,查询将被优化并分解为更加细化的任务,分布到每一个segment进行处理,共同提交最终结果。网络层负责segments之间的进程进行通讯。

HAWQHAWQ,amassivelyparallelSQL-compliantengineontopofHDFS(Hadoop分布式系统).HAWQ在内核中使用Orca体系设计高效的查询方案,降低Hadoop集群的数据访问成本。HAWQ把最新的基于成本的优化和Hadoop的可扩展性容错性结合了起来,在PB级规模上实现了数据的交互处理。InteractionofOrcawithdatabasesystemOrcaisthenewqueryoptimizerforPivotaldatamanagementproducts,includingGPDBandHAWQ.DXL:查询优化器的解耦需要建立一个沟通机制与数据库系统通信来处理查询。Orca体系包括一个框架,用于数据库系统和优化器之间的数据交换,这个框架叫做DataeXchangeLanguage(DXL)。InteractionofOrcawithdatabasesystemtranslatorInteractionofOrcawithdatabasesystemFigure2showstheinteractionbetweenOrcaandanexternaldatabasesystem.TheinputtoOrcaisaDXLquery.TheoutputofOrcaisaDXLplan.Duringoptimization,thedatabasesystemcanbequeriedformetadata(e.g.,tabledefinitions).Orcaabstractsmetadataaccessdetailsbyallowingdatabasesystemtoregisterametadataprovider(MDProvider)thatisresponsibleforserializingmetadataintoDXLbeforebeingsenttoOrca.Thedatabasesystemneedstoincludetranslatorsthatconsume/emitdatainDXLformat.Query2DXLtranslatorconvertsaqueryparsetreeintoaDXLquery,whileDXL2PlantranslatorconvertsaDXLplanintoanexecutableplan.TheimplementationofsuchtranslatorsisdonecompletelyoutsideOrca,whichallowsmultipletouseOrcabyprovidingtheappropriatetranslators.OrcaarchitectureMemo.Thespaceofplanalternativesgeneratedbytheoptimizerisencodedinacompactin-memorydatastructurecalledtheMemo.TheMemostructureconsistsofasetofcontainerscalledgroups,whereeachgroupcontainslogicallyequivalentexpressions.Memo是一个由group的集合。每一个group包含一类逻辑等价式。

Memogroupscapturethedifferentsub-goalsofaquery(e.g.,afilteronatable,orajoinoftwotables).将查询拆解成子目标,由group获得。Groupmembers,calledgroupexpressions,achievethegroupgoalindifferentlogicalways(e.g.,differentjoinorders).Eachgroupexpressionisanoperatorthathasothergroupsasitschildren.SearchandJobSchedulerOrcausesasearchmechanismtonavigatethroughthespaceofpossibleplanalternativesandidentifytheplanwiththeleastestimatedcost.Thesearchmechanism由专门的JobScheduler来创建独立或者并行的workunits来完成,大概分为三个步骤:

explorationwhereequivalentlogicalexpressionsaregenerated,implementationwherephysicalplansaregenerated,andoptimization,whererequiredphysicalproperties(e.g.,sortorder)areenforcedandplanalternativesarecosted.TransformationsPlanalternativesaregeneratedbyapplyingtransformationrulesthatcanproduceeitherequivalentlogicalexpressions(e.g.,InnerJoin(A,B)→InnerJoin(B,A)),orphysicalimplementationsofexistingexpressions(e.g.,Join(A,B)→HashJoin(A,B)).Theresultsofapplyingtransformationrulesarecopied-intotheMemo,whichmayresultincreatingnewgroupsand/oraddingnewgroupexpressionstoexistinggroups.Eachtransformationruleisaself-containedcomponentthatcanbeexplicitlyactivated/deactivatedinOrcaconfigurations.PropertyEnforcementOrcaincludesanextensibleframeworkfordescribingqueryrequirementsandplancharacteristicsbasedonformalpropertyspecifications.Propertieshavedifferenttypesincludinglogicalproperties(e.g.,outputcolumns),physicalproperties(e.g.,sortorderanddatadistribution),andscalarproperties(e.g.,columnsusedinjoinconditions).Duringqueryoptimization,eachoperatormayrequestspecificpropertiesfromitschildren.Anoptimizedchildplanmayeithersatisfytherequiredpropertiesonitsown(e.g.,anIndexScanplandeliverssorteddata),oranenforcer(e.g.,aSortoperator)needstobepluggedintheplantodelivertherequiredproperty.Theframeworkallowseachoperatortocontrolenforcersplacementbasedonchildplans'propertiesandoperator'slocalbehavior.MetadataCacheSincemetadata(e.g.,tabledefinitions)changesinfrequently,shippingitwitheveryqueryincursanoverhead.Orcacachesmetadataontheoptimizersideandonlyretrievespiecesofitfromthecatalogifsomethingisunavailableinthecache,orhaschangedsincethelasttimeitwasloadedinthecache.Metadatacachealsoabstractsthedatabasesystemdetailsfromtheoptimizer,whichisparticularlyusefulduringtestinganddebu

温馨提示

  • 1. 本站所有资源如无特殊说明,都需要本地电脑安装OFFICE2007和PDF阅读器。图纸软件为CAD,CAXA,PROE,UG,SolidWorks等.压缩文件请下载最新的WinRAR软件解压。
  • 2. 本站的文档不包含任何第三方提供的附件图纸等,如果需要附件,请联系上传者。文件的所有权益归上传用户所有。
  • 3. 本站RAR压缩包中若带图纸,网页内容里面会有图纸预览,若没有图纸预览就没有图纸。
  • 4. 未经权益所有人同意不得将文件中的内容挪作商业或盈利用途。
  • 5. 人人文库网仅提供信息存储空间,仅对用户上传内容的表现方式做保护处理,对用户上传分享的文档内容本身不做任何修改或编辑,并不能对任何下载内容负责。
  • 6. 下载文件中如有侵权或不适当内容,请与我们联系,我们立即纠正。
  • 7. 本站不保证下载资源的准确性、安全性和完整性, 同时也不承担用户因使用这些下载资源对自己和他人造成任何形式的伤害或损失。

评论

0/150

提交评论