an introduction to the berkeley data analytics stack

an introduction to the berkeley data analytics stack

ID:20631135

大小:1.29 MB

页数:50页

时间:2018-10-14

an introduction to the berkeley data analytics stack_第1页
an introduction to the berkeley data analytics stack_第2页
an introduction to the berkeley data analytics stack_第3页
an introduction to the berkeley data analytics stack_第4页
an introduction to the berkeley data analytics stack_第5页
资源描述:

《an introduction to the berkeley data analytics stack》由会员上传分享,免费在线阅读,更多相关内容在教育资源-天天文库

1、ReynoldXinParallelProgrammingWithApacheSparkWhatisSpark?EfficiencyGeneralexecutiongraphsIn-memorystorageUsabilityRichAPIsinJava,Scala,PythonInteractiveshellUpto10×fasterondisk,100×inmemory2-10×lesscodeFastandExpressiveClusterComputingSystemCompatiblewithApacheHadoo

2、pProjectHistorySparkstartedin2009,opensourced2010InuseatIntel,Yahoo!,Adobe,AlibabaTaobao,Conviva,Ooyala,BizoandothersEnteredApacheIncubatorinJuneOpenSourceCommunity1300+meetupmembers90+codecontributors20companiescontributingThisTalkIntroductiontoSparkTourofSparkope

3、rations(inPython)JobexecutionStandaloneappsKeyIdeaWriteprogramsintermsoftransformationsondistributeddatasetsConcept:resilientdistributeddatasets(RDDs)CollectionsofobjectsspreadacrossaclusterBuiltthroughparalleltransformations(map,filter,etc)Automaticallyrebuiltonfa

4、ilureControllablepersistence(e.g.cachinginRAM)OperationsTransformations(e.g.map,filter,groupBy)LazyoperationstobuildRDDsfromotherRDDsActions(e.g.count,collect,save)ReturnaresultorwriteittostorageExample:LogMiningLoaderrormessagesfromalogintomemory,theninteractively

5、searchforvariouspatternslines=spark.textFile(“hdfs://...”)errors=lines.filter(lambdas:s.startswith(“ERROR”))messages=errors.map(lambdas:s.split(“t”)[2])messages.cache()Block1Block2Block3WorkerWorkerWorkerDrivermessages.filter(lambdas:“foo”ins).count()messages.filt

6、er(lambdas:“bar”ins).count()...tasksresultsCache1Cache2Cache3BaseRDDTransformedRDDActionResult:full-textsearchofWikipediain0.5sec(vs20sforon-diskdata)Result:scaledto1TBdatain5sec (vs180secforon-diskdata)FaultRecoveryRDDstracklineageinformationthatcanbeusedtoefficie

7、ntlyrecomputelostdataEx:msgs=textFile.filter(lambdas:s.startsWith(“ERROR”)).map(lambdas:s.split(“t”)[2])HDFSFileFilteredRDDMappedRDDfilter(func=_.contains(...))map(func=_.split(...))BehaviorwithLessRAMSparkinScalaandJava//Scala:vallines=sc.textFile(...) lines.filt

8、er(x=>x.contains(“ERROR”)).count()//Java:JavaRDDlines=sc.textFile(...); lines.filter(newFunction(){ Booleancall(Strings){

当前文档最多预览五页,下载文档查看全文

此文档下载收益归作者所有

当前文档最多预览五页,下载文档查看全文
温馨提示:
1. 部分包含数学公式或PPT动画的文件,查看预览时可能会显示错乱或异常,文件下载后无此问题,请放心下载。
2. 本文档由用户上传,版权归属用户,天天文库负责整理代发布。如果您对本文档版权有争议请及时联系客服。
3. 下载前请仔细阅读文档内容,确认文档内容符合您的需求后进行下载,若出现内容与标题不符可向本站投诉处理。
4. 下载文档时可能由于网络波动等原因无法下载或下载错误,付费完成后未能成功下载的用户请联系客服处理。