install jdk. jdk is required for spark ... -...

14

Upload: others

Post on 21-Jun-2020

35 views

Category:

Documents


0 download

TRANSCRIPT

Page 1: Install JDK. JDK is required for Spark ... - files.meetup.comfiles.meetup.com/19103823/SparkIntroJan5.pdf · Scala is - object oriented, funcKonal and stacally typed. Provides higher
Page 2: Install JDK. JDK is required for Spark ... - files.meetup.comfiles.meetup.com/19103823/SparkIntroJan5.pdf · Scala is - object oriented, funcKonal and stacally typed. Provides higher

  InstallJDK.JDKisrequiredforSpark. WewillbeusingSpark-1.4.1. DownloadSparkfrom.h@p://spark.apache.org/downloads.htmlScreenshotinnextslide

Page 3: Install JDK. JDK is required for Spark ... - files.meetup.comfiles.meetup.com/19103823/SparkIntroJan5.pdf · Scala is - object oriented, funcKonal and stacally typed. Provides higher
Page 4: Install JDK. JDK is required for Spark ... - files.meetup.comfiles.meetup.com/19103823/SparkIntroJan5.pdf · Scala is - object oriented, funcKonal and stacally typed. Provides higher

  ExtracttheArchiveandcdtothenewlycreateddirectory.  Invokeshellusing./bin/spark-shell

Page 5: Install JDK. JDK is required for Spark ... - files.meetup.comfiles.meetup.com/19103823/SparkIntroJan5.pdf · Scala is - object oriented, funcKonal and stacally typed. Provides higher

  Scalais-objectoriented,funcKonalandstaKcallytyped.  ProvideshigherlevelofabstracKon.  Recommendedbook:ProgramminginScala:AComprehensiveStep-by-StepGuide,2ndEdiKonbyMarKnOdersky MarKnOderskyisthecreatorofScala.

Page 6: Install JDK. JDK is required for Spark ... - files.meetup.comfiles.meetup.com/19103823/SparkIntroJan5.pdf · Scala is - object oriented, funcKonal and stacally typed. Provides higher

  FuncKonsarefirstclassciKzens.  Itisavaluejustlikeanintegerorstring.UnlikefuncKonpointersinC/C++  PassfuncKonsasargumentstootherfuncKons,returnthemasresults.  DefineafuncKoninsideanotherfuncKon.  DefinefuncKonswithoutgivingthemaname.Example:x=>x+1,moreconcisewayis(_+1)  SprinklecodewithfuncKonliterals.

Page 7: Install JDK. JDK is required for Spark ... - files.meetup.comfiles.meetup.com/19103823/SparkIntroJan5.pdf · Scala is - object oriented, funcKonal and stacally typed. Provides higher

  FuncKonsmapinputvaluestooutputvaluesratherthanchangedatainplace.

s.replace(‘a’,’b’)yieldsanewstringobject  ImmutabledatastructuresarecornerstoneoffuncKonalprogramming. Methodsshouldn’thaveanysideeffects.  SomefuncKonalprogramminglanguagesevenprohibitsideeffects.ButScaladoesallowit.

Page 8: Install JDK. JDK is required for Spark ... - files.meetup.comfiles.meetup.com/19103823/SparkIntroJan5.pdf · Scala is - object oriented, funcKonal and stacally typed. Provides higher

  StaKcTypingisdesirablebutannoyingwhenyouhavetospecifytypesredundantly.  Ex:intinc(inty){returny+1)  Ifcompilerwassmartitcouldinc(inty)(y+1). Weshallseelaterhoweventheinputtypecanbeinferred.Sotitcanbewri@ensimplyas(_+1)

Page 9: Install JDK. JDK is required for Spark ... - files.meetup.comfiles.meetup.com/19103823/SparkIntroJan5.pdf · Scala is - object oriented, funcKonal and stacally typed. Provides higher
Page 10: Install JDK. JDK is required for Spark ... - files.meetup.comfiles.meetup.com/19103823/SparkIntroJan5.pdf · Scala is - object oriented, funcKonal and stacally typed. Provides higher

  ClustercompuKngframeworksletsyouwriteparallelcomputaKonsusingahighlevelsetofoperators. HadoopMapReduce,Dryad,SparkareclustercompuKngframeworks. WordCounttodemonstrate–HigherleveloperaKons.

Page 11: Install JDK. JDK is required for Spark ... - files.meetup.comfiles.meetup.com/19103823/SparkIntroJan5.pdf · Scala is - object oriented, funcKonal and stacally typed. Provides higher

 MoreopKmalwhenyoureuseintermediatedataovermulKplecomputaKons. DatareuseiscommoninMachineLearningandgraphalgorithms.  InteracKvedatamining. Handlesbothbatch,interacKveandstreamingapplicaKonswithinoneframework  SupportsJava,ScalaandPython HigherlevelofabstracKon.

Page 12: Install JDK. JDK is required for Spark ... - files.meetup.comfiles.meetup.com/19103823/SparkIntroJan5.pdf · Scala is - object oriented, funcKonal and stacally typed. Provides higher

 Data-CollecKonofelements. Distributed-DividedintoparKKonsandtheparKKonscanbespreadouttoresideondifferentmachinesinthecluster.  Resilient–Maintainslineageandifyoulosedataitcanbere-computed.  Couldbepersistedindiskorcanresideinmemory.

Page 13: Install JDK. JDK is required for Spark ... - files.meetup.comfiles.meetup.com/19103823/SparkIntroJan5.pdf · Scala is - object oriented, funcKonal and stacally typed. Provides higher

  TransformaKon  islazy  createsnewdatasetfromexisKngone.  examples:filter,map.

 AcKons  count,take  ComputesallRDD’sinlineage.

Page 14: Install JDK. JDK is required for Spark ... - files.meetup.comfiles.meetup.com/19103823/SparkIntroJan5.pdf · Scala is - object oriented, funcKonal and stacally typed. Provides higher