SlideShare a Scribd company logo
1 of 12
Download to read offline
How to run Appache Spark
on Windows(in SBT
console)
ANKITKUMAR KANERI
EMAIL: KANERI776@GMAIL.COM
Agenda
• Requirements
• Creating a Maven compliant folder structure
• Testing
• Useful Links
Requirements:
• Computer system with windows
• OS 7/8/10
• SBT console installed
• Scala(I used 2.10.6)
• Java(version used 1.8.0_181)
Creating a Maven compliant folder structure
Please follow the below steps:
1. Go to any directory in windows and create below folder structure
Ex: C:User(systemname)
2. Create folder of any name(I created as ie_spark) and create sub-
folder shown below strutucre
Ex: C:Users(systemname)ie_sparksrcmainscala
3. Create file called build.sbt and below content in that file and place
that file in the following path
Ex: C:Users(systemname)ie_spark
• Content of build.sbt file is as follows:
name := "ie_spark_example"
version := "0.1.1"
scalaVersion := "2.10.6“ //(my scala version is 2.10.6)
libraryDependencies += "org.apache.spark" % "spark-core_2.10" %
"1.6.2“
• Basically we are specifying instructions for SBT to resolve the library
dependencies that you mentioned in the build.sbt.
• When you “compile” scala code using SBT, it looks into build.sbt to
see what dependencies are needed and it will go the specific
repositories and will download them so that when your program
needs them, they are there.
• So basically we are saying that your scala program that you’re gonna
use will require Apache Spark Core libraries. So SBT will then go to
maven repository to grab this library along with all of its
dependencies.
• Now go to command prompt and perform the following steps:
1. Change directory to ie_spark . Use following command to change the
directory.
cd C:Users(systemname)scaladie_spark
2. Use command sbt console and enter
• You first create a Spark Conf object where you also specify the Spark
mode. As you are executing it on your lonely laptop, so you will
specify “local” mode here.
val conf=new org.apache.spark.SparkConf().setAppName("IE
SPARK").setMaster("local")
and the next step is to create Spark Context (the entry point to use
Spark Cluster and its APIs) using the conf object:
val sc=new org.apache.spark.SparkContext(conf)
Figure shows the creating configuration and initializing spark
context
Testing:
• Attached video for your reference, where it shows Spark
Context is working as expected.
• You can also check by using the below code:
scala> val parallel = sc.parallelize(Array("Ankit", "Vinay")) //
one input
parallel: org.apache.spark.rdd.RDD[String] =
ParallelCollectionRDD[27] at parallelize at <console>:24
scala> val par2 = sc.parallelize(Array("praveen", "Raju",
"Ankit")) // sec input
par2: org.apache.spark.rdd.RDD[String] =
ParallelCollectionRDD[28] at parallelize at <console>:24
scala> parallel.union(par2).collect
res21: Array[String] = Array(Ankit,Vinay, praveen,
Raju)//union output
scala> parallel.intersection(par2).collect
res21: Array[String] = Array(Ankit)//intersection output
Useful Links:
• Youtube Channel: https://www.youtube.com/channel/UCRzsq7k4-kT-
h3TDUBQ82-w
• Apache Spark: https://spark.apache.org/documentation.html
• Hortonworks: https://hortonworks.com/apache/spark/
• GitHub: https://github.com/apache/spark
• Cloudera: https://www.cloudera.com/products/open-source/apache-
hadoop/apache-spark.html
• Databrick: https://databricks.com/spark/about
Thank you

More Related Content

What's hot

patchVantage Cloud Starter Pack
patchVantage Cloud Starter Pack patchVantage Cloud Starter Pack
patchVantage Cloud Starter Pack David McNish
 
Why You Should Use Oracle SQL Developer
Why You Should Use Oracle SQL DeveloperWhy You Should Use Oracle SQL Developer
Why You Should Use Oracle SQL DeveloperJeffrey Kemp
 
Amazon S3 connector
Amazon S3 connectorAmazon S3 connector
Amazon S3 connectorThang Loi
 
Learn to love networking on iOS
Learn to love networking on iOSLearn to love networking on iOS
Learn to love networking on iOSPaolo Tagliani
 
Java on Azure JJUG Night Seminar 2016 0322
Java on Azure JJUG Night Seminar 2016 0322Java on Azure JJUG Night Seminar 2016 0322
Java on Azure JJUG Night Seminar 2016 0322Yoshio Terada
 
Enable oracle database vault
Enable oracle database vaultEnable oracle database vault
Enable oracle database vaultOsama Mustafa
 
Apache
ApacheApache
Apachejtpond
 
Dspace for windows
Dspace for windowsDspace for windows
Dspace for windowsRavi Bankar
 
CONTINUOUS INTEGRATION && DOCKER
CONTINUOUS INTEGRATION && DOCKERCONTINUOUS INTEGRATION && DOCKER
CONTINUOUS INTEGRATION && DOCKERStfalcon Meetups
 
Selenium lightning-talk
Selenium lightning-talkSelenium lightning-talk
Selenium lightning-talkStephen Donner
 
EXPERTALKS: Nov 2012 - Web Application Clustering
EXPERTALKS: Nov 2012 - Web Application ClusteringEXPERTALKS: Nov 2012 - Web Application Clustering
EXPERTALKS: Nov 2012 - Web Application ClusteringEXPERTALKS
 
Introduction to Elastic Beanstalk
Introduction to Elastic BeanstalkIntroduction to Elastic Beanstalk
Introduction to Elastic BeanstalkWolfgang Schell
 
Introduction to node.js
Introduction to node.jsIntroduction to node.js
Introduction to node.jsSu Zin Kyaw
 
Ansible automation tool with modules
Ansible automation tool with modulesAnsible automation tool with modules
Ansible automation tool with modulesmohamedmoharam
 

What's hot (20)

patchVantage Cloud Starter Pack
patchVantage Cloud Starter Pack patchVantage Cloud Starter Pack
patchVantage Cloud Starter Pack
 
Enabling Security For ActiveMQ JMX Access
Enabling Security For ActiveMQ JMX AccessEnabling Security For ActiveMQ JMX Access
Enabling Security For ActiveMQ JMX Access
 
Why You Should Use Oracle SQL Developer
Why You Should Use Oracle SQL DeveloperWhy You Should Use Oracle SQL Developer
Why You Should Use Oracle SQL Developer
 
Amazon S3 connector
Amazon S3 connectorAmazon S3 connector
Amazon S3 connector
 
Learn to love networking on iOS
Learn to love networking on iOSLearn to love networking on iOS
Learn to love networking on iOS
 
Java on Azure JJUG Night Seminar 2016 0322
Java on Azure JJUG Night Seminar 2016 0322Java on Azure JJUG Night Seminar 2016 0322
Java on Azure JJUG Night Seminar 2016 0322
 
Performance testing meets the cloud - Artem Shendrikov
Performance testing meets the cloud -  Artem ShendrikovPerformance testing meets the cloud -  Artem Shendrikov
Performance testing meets the cloud - Artem Shendrikov
 
Readme
ReadmeReadme
Readme
 
Enable oracle database vault
Enable oracle database vaultEnable oracle database vault
Enable oracle database vault
 
Apache
ApacheApache
Apache
 
Dspace for windows
Dspace for windowsDspace for windows
Dspace for windows
 
CONTINUOUS INTEGRATION && DOCKER
CONTINUOUS INTEGRATION && DOCKERCONTINUOUS INTEGRATION && DOCKER
CONTINUOUS INTEGRATION && DOCKER
 
Virtual server on aws
Virtual server on awsVirtual server on aws
Virtual server on aws
 
Selenium lightning-talk
Selenium lightning-talkSelenium lightning-talk
Selenium lightning-talk
 
Sql installation
Sql installationSql installation
Sql installation
 
EXPERTALKS: Nov 2012 - Web Application Clustering
EXPERTALKS: Nov 2012 - Web Application ClusteringEXPERTALKS: Nov 2012 - Web Application Clustering
EXPERTALKS: Nov 2012 - Web Application Clustering
 
Introduction to Elastic Beanstalk
Introduction to Elastic BeanstalkIntroduction to Elastic Beanstalk
Introduction to Elastic Beanstalk
 
Introduction to node.js
Introduction to node.jsIntroduction to node.js
Introduction to node.js
 
Azure sharepointsql
Azure sharepointsqlAzure sharepointsql
Azure sharepointsql
 
Ansible automation tool with modules
Ansible automation tool with modulesAnsible automation tool with modules
Ansible automation tool with modules
 

Similar to How to run appache spark on windows(in sbt console)

Installing spark scala console in windows 10
Installing spark scala console in windows 10Installing spark scala console in windows 10
Installing spark scala console in windows 10Ankit Kaneri
 
Spring Live Sample Chapter
Spring Live Sample ChapterSpring Live Sample Chapter
Spring Live Sample ChapterSyed Shahul
 
Apache spark undocumented extensions
Apache spark undocumented extensionsApache spark undocumented extensions
Apache spark undocumented extensionsSandeep Joshi
 
IBM Index 2018 Conference Workshop: Modernizing Traditional Java App's with D...
IBM Index 2018 Conference Workshop: Modernizing Traditional Java App's with D...IBM Index 2018 Conference Workshop: Modernizing Traditional Java App's with D...
IBM Index 2018 Conference Workshop: Modernizing Traditional Java App's with D...Eric Smalling
 
How to use_cucumber_rest-assured_api_framework
How to use_cucumber_rest-assured_api_frameworkHow to use_cucumber_rest-assured_api_framework
How to use_cucumber_rest-assured_api_frameworkHarshad Ingle
 
Maven: Managing Software Projects for Repeatable Results
Maven: Managing Software Projects for Repeatable ResultsMaven: Managing Software Projects for Repeatable Results
Maven: Managing Software Projects for Repeatable ResultsSteve Keener
 
UKLUG 2012 - XPages, Beyond the basics
UKLUG 2012 - XPages, Beyond the basicsUKLUG 2012 - XPages, Beyond the basics
UKLUG 2012 - XPages, Beyond the basicsUlrich Krause
 
Spring hibernate tutorial
Spring hibernate tutorialSpring hibernate tutorial
Spring hibernate tutorialRohit Jagtap
 
How to start using Scala
How to start using ScalaHow to start using Scala
How to start using ScalaNgoc Dao
 
Maven TestNg frame work (1) (1)
Maven TestNg frame work (1) (1)Maven TestNg frame work (1) (1)
Maven TestNg frame work (1) (1)Gopi Raghavendra
 
XPages -Beyond the Basics
XPages -Beyond the BasicsXPages -Beyond the Basics
XPages -Beyond the BasicsUlrich Krause
 
[DanNotes] XPages - Beyound the Basics
[DanNotes] XPages - Beyound the Basics[DanNotes] XPages - Beyound the Basics
[DanNotes] XPages - Beyound the BasicsUlrich Krause
 
How to Play at Work - A Play Framework Tutorial
How to Play at Work - A Play Framework TutorialHow to Play at Work - A Play Framework Tutorial
How to Play at Work - A Play Framework TutorialAssistSoftware
 
Dockerized .Net Core based app services in azure K8s
Dockerized .Net Core based app services in azure K8s Dockerized .Net Core based app services in azure K8s
Dockerized .Net Core based app services in azure K8s Ranjeet Bhargava
 
Introduction to Apache Ant
Introduction to Apache AntIntroduction to Apache Ant
Introduction to Apache AntShih-Hsiang Lin
 
Part 4 Scripting and Virtualization (due Week 7)Objectives1. .docx
Part 4 Scripting and Virtualization (due Week 7)Objectives1. .docxPart 4 Scripting and Virtualization (due Week 7)Objectives1. .docx
Part 4 Scripting and Virtualization (due Week 7)Objectives1. .docxkarlhennesey
 
Dockerization of Azure Platform
Dockerization of Azure PlatformDockerization of Azure Platform
Dockerization of Azure Platformnirajrules
 

Similar to How to run appache spark on windows(in sbt console) (20)

Apache Ant
Apache AntApache Ant
Apache Ant
 
Installing spark scala console in windows 10
Installing spark scala console in windows 10Installing spark scala console in windows 10
Installing spark scala console in windows 10
 
Spring Live Sample Chapter
Spring Live Sample ChapterSpring Live Sample Chapter
Spring Live Sample Chapter
 
Apache spark undocumented extensions
Apache spark undocumented extensionsApache spark undocumented extensions
Apache spark undocumented extensions
 
IBM Index 2018 Conference Workshop: Modernizing Traditional Java App's with D...
IBM Index 2018 Conference Workshop: Modernizing Traditional Java App's with D...IBM Index 2018 Conference Workshop: Modernizing Traditional Java App's with D...
IBM Index 2018 Conference Workshop: Modernizing Traditional Java App's with D...
 
How to use_cucumber_rest-assured_api_framework
How to use_cucumber_rest-assured_api_frameworkHow to use_cucumber_rest-assured_api_framework
How to use_cucumber_rest-assured_api_framework
 
Maven: Managing Software Projects for Repeatable Results
Maven: Managing Software Projects for Repeatable ResultsMaven: Managing Software Projects for Repeatable Results
Maven: Managing Software Projects for Repeatable Results
 
Tomcat + other things
Tomcat + other thingsTomcat + other things
Tomcat + other things
 
UKLUG 2012 - XPages, Beyond the basics
UKLUG 2012 - XPages, Beyond the basicsUKLUG 2012 - XPages, Beyond the basics
UKLUG 2012 - XPages, Beyond the basics
 
Spring hibernate tutorial
Spring hibernate tutorialSpring hibernate tutorial
Spring hibernate tutorial
 
How to start using Scala
How to start using ScalaHow to start using Scala
How to start using Scala
 
Maven TestNg frame work (1) (1)
Maven TestNg frame work (1) (1)Maven TestNg frame work (1) (1)
Maven TestNg frame work (1) (1)
 
XPages -Beyond the Basics
XPages -Beyond the BasicsXPages -Beyond the Basics
XPages -Beyond the Basics
 
[DanNotes] XPages - Beyound the Basics
[DanNotes] XPages - Beyound the Basics[DanNotes] XPages - Beyound the Basics
[DanNotes] XPages - Beyound the Basics
 
How to Play at Work - A Play Framework Tutorial
How to Play at Work - A Play Framework TutorialHow to Play at Work - A Play Framework Tutorial
How to Play at Work - A Play Framework Tutorial
 
Dockerized .Net Core based app services in azure K8s
Dockerized .Net Core based app services in azure K8s Dockerized .Net Core based app services in azure K8s
Dockerized .Net Core based app services in azure K8s
 
Introduction to Apache Ant
Introduction to Apache AntIntroduction to Apache Ant
Introduction to Apache Ant
 
Part 4 Scripting and Virtualization (due Week 7)Objectives1. .docx
Part 4 Scripting and Virtualization (due Week 7)Objectives1. .docxPart 4 Scripting and Virtualization (due Week 7)Objectives1. .docx
Part 4 Scripting and Virtualization (due Week 7)Objectives1. .docx
 
Dockerization of Azure Platform
Dockerization of Azure PlatformDockerization of Azure Platform
Dockerization of Azure Platform
 
Build application using sbt
Build application using sbtBuild application using sbt
Build application using sbt
 

Recently uploaded

{Pooja: 9892124323 } Call Girl in Mumbai | Jas Kaur Rate 4500 Free Hotel Del...
{Pooja:  9892124323 } Call Girl in Mumbai | Jas Kaur Rate 4500 Free Hotel Del...{Pooja:  9892124323 } Call Girl in Mumbai | Jas Kaur Rate 4500 Free Hotel Del...
{Pooja: 9892124323 } Call Girl in Mumbai | Jas Kaur Rate 4500 Free Hotel Del...Pooja Nehwal
 
Indian Call Girls in Abu Dhabi O5286O24O8 Call Girls in Abu Dhabi By Independ...
Indian Call Girls in Abu Dhabi O5286O24O8 Call Girls in Abu Dhabi By Independ...Indian Call Girls in Abu Dhabi O5286O24O8 Call Girls in Abu Dhabi By Independ...
Indian Call Girls in Abu Dhabi O5286O24O8 Call Girls in Abu Dhabi By Independ...dajasot375
 
Beautiful Sapna Vip Call Girls Hauz Khas 9711199012 Call /Whatsapps
Beautiful Sapna Vip  Call Girls Hauz Khas 9711199012 Call /WhatsappsBeautiful Sapna Vip  Call Girls Hauz Khas 9711199012 Call /Whatsapps
Beautiful Sapna Vip Call Girls Hauz Khas 9711199012 Call /Whatsappssapnasaifi408
 
dokumen.tips_chapter-4-transient-heat-conduction-mehmet-kanoglu.ppt
dokumen.tips_chapter-4-transient-heat-conduction-mehmet-kanoglu.pptdokumen.tips_chapter-4-transient-heat-conduction-mehmet-kanoglu.ppt
dokumen.tips_chapter-4-transient-heat-conduction-mehmet-kanoglu.pptSonatrach
 
(PARI) Call Girls Wanowrie ( 7001035870 ) HI-Fi Pune Escorts Service
(PARI) Call Girls Wanowrie ( 7001035870 ) HI-Fi Pune Escorts Service(PARI) Call Girls Wanowrie ( 7001035870 ) HI-Fi Pune Escorts Service
(PARI) Call Girls Wanowrie ( 7001035870 ) HI-Fi Pune Escorts Serviceranjana rawat
 
Kantar AI Summit- Under Embargo till Wednesday, 24th April 2024, 4 PM, IST.pdf
Kantar AI Summit- Under Embargo till Wednesday, 24th April 2024, 4 PM, IST.pdfKantar AI Summit- Under Embargo till Wednesday, 24th April 2024, 4 PM, IST.pdf
Kantar AI Summit- Under Embargo till Wednesday, 24th April 2024, 4 PM, IST.pdfSocial Samosa
 
Predicting Employee Churn: A Data-Driven Approach Project Presentation
Predicting Employee Churn: A Data-Driven Approach Project PresentationPredicting Employee Churn: A Data-Driven Approach Project Presentation
Predicting Employee Churn: A Data-Driven Approach Project PresentationBoston Institute of Analytics
 
B2 Creative Industry Response Evaluation.docx
B2 Creative Industry Response Evaluation.docxB2 Creative Industry Response Evaluation.docx
B2 Creative Industry Response Evaluation.docxStephen266013
 
Industrialised data - the key to AI success.pdf
Industrialised data - the key to AI success.pdfIndustrialised data - the key to AI success.pdf
Industrialised data - the key to AI success.pdfLars Albertsson
 
定制英国白金汉大学毕业证(UCB毕业证书) 成绩单原版一比一
定制英国白金汉大学毕业证(UCB毕业证书)																			成绩单原版一比一定制英国白金汉大学毕业证(UCB毕业证书)																			成绩单原版一比一
定制英国白金汉大学毕业证(UCB毕业证书) 成绩单原版一比一ffjhghh
 
High Class Call Girls Noida Sector 39 Aarushi 🔝8264348440🔝 Independent Escort...
High Class Call Girls Noida Sector 39 Aarushi 🔝8264348440🔝 Independent Escort...High Class Call Girls Noida Sector 39 Aarushi 🔝8264348440🔝 Independent Escort...
High Class Call Girls Noida Sector 39 Aarushi 🔝8264348440🔝 Independent Escort...soniya singh
 
100-Concepts-of-AI by Anupama Kate .pptx
100-Concepts-of-AI by Anupama Kate .pptx100-Concepts-of-AI by Anupama Kate .pptx
100-Concepts-of-AI by Anupama Kate .pptxAnupama Kate
 
VIP High Class Call Girls Jamshedpur Anushka 8250192130 Independent Escort Se...
VIP High Class Call Girls Jamshedpur Anushka 8250192130 Independent Escort Se...VIP High Class Call Girls Jamshedpur Anushka 8250192130 Independent Escort Se...
VIP High Class Call Girls Jamshedpur Anushka 8250192130 Independent Escort Se...Suhani Kapoor
 
VIP Call Girls in Amravati Aarohi 8250192130 Independent Escort Service Amravati
VIP Call Girls in Amravati Aarohi 8250192130 Independent Escort Service AmravatiVIP Call Girls in Amravati Aarohi 8250192130 Independent Escort Service Amravati
VIP Call Girls in Amravati Aarohi 8250192130 Independent Escort Service AmravatiSuhani Kapoor
 
Full night 🥵 Call Girls Delhi New Friends Colony {9711199171} Sanya Reddy ✌️o...
Full night 🥵 Call Girls Delhi New Friends Colony {9711199171} Sanya Reddy ✌️o...Full night 🥵 Call Girls Delhi New Friends Colony {9711199171} Sanya Reddy ✌️o...
Full night 🥵 Call Girls Delhi New Friends Colony {9711199171} Sanya Reddy ✌️o...shivangimorya083
 
Log Analysis using OSSEC sasoasasasas.pptx
Log Analysis using OSSEC sasoasasasas.pptxLog Analysis using OSSEC sasoasasasas.pptx
Log Analysis using OSSEC sasoasasasas.pptxJohnnyPlasten
 
Saket, (-DELHI )+91-9654467111-(=)CHEAP Call Girls in Escorts Service Saket C...
Saket, (-DELHI )+91-9654467111-(=)CHEAP Call Girls in Escorts Service Saket C...Saket, (-DELHI )+91-9654467111-(=)CHEAP Call Girls in Escorts Service Saket C...
Saket, (-DELHI )+91-9654467111-(=)CHEAP Call Girls in Escorts Service Saket C...Sapana Sha
 

Recently uploaded (20)

{Pooja: 9892124323 } Call Girl in Mumbai | Jas Kaur Rate 4500 Free Hotel Del...
{Pooja:  9892124323 } Call Girl in Mumbai | Jas Kaur Rate 4500 Free Hotel Del...{Pooja:  9892124323 } Call Girl in Mumbai | Jas Kaur Rate 4500 Free Hotel Del...
{Pooja: 9892124323 } Call Girl in Mumbai | Jas Kaur Rate 4500 Free Hotel Del...
 
Indian Call Girls in Abu Dhabi O5286O24O8 Call Girls in Abu Dhabi By Independ...
Indian Call Girls in Abu Dhabi O5286O24O8 Call Girls in Abu Dhabi By Independ...Indian Call Girls in Abu Dhabi O5286O24O8 Call Girls in Abu Dhabi By Independ...
Indian Call Girls in Abu Dhabi O5286O24O8 Call Girls in Abu Dhabi By Independ...
 
Beautiful Sapna Vip Call Girls Hauz Khas 9711199012 Call /Whatsapps
Beautiful Sapna Vip  Call Girls Hauz Khas 9711199012 Call /WhatsappsBeautiful Sapna Vip  Call Girls Hauz Khas 9711199012 Call /Whatsapps
Beautiful Sapna Vip Call Girls Hauz Khas 9711199012 Call /Whatsapps
 
dokumen.tips_chapter-4-transient-heat-conduction-mehmet-kanoglu.ppt
dokumen.tips_chapter-4-transient-heat-conduction-mehmet-kanoglu.pptdokumen.tips_chapter-4-transient-heat-conduction-mehmet-kanoglu.ppt
dokumen.tips_chapter-4-transient-heat-conduction-mehmet-kanoglu.ppt
 
(PARI) Call Girls Wanowrie ( 7001035870 ) HI-Fi Pune Escorts Service
(PARI) Call Girls Wanowrie ( 7001035870 ) HI-Fi Pune Escorts Service(PARI) Call Girls Wanowrie ( 7001035870 ) HI-Fi Pune Escorts Service
(PARI) Call Girls Wanowrie ( 7001035870 ) HI-Fi Pune Escorts Service
 
E-Commerce Order PredictionShraddha Kamble.pptx
E-Commerce Order PredictionShraddha Kamble.pptxE-Commerce Order PredictionShraddha Kamble.pptx
E-Commerce Order PredictionShraddha Kamble.pptx
 
Kantar AI Summit- Under Embargo till Wednesday, 24th April 2024, 4 PM, IST.pdf
Kantar AI Summit- Under Embargo till Wednesday, 24th April 2024, 4 PM, IST.pdfKantar AI Summit- Under Embargo till Wednesday, 24th April 2024, 4 PM, IST.pdf
Kantar AI Summit- Under Embargo till Wednesday, 24th April 2024, 4 PM, IST.pdf
 
Predicting Employee Churn: A Data-Driven Approach Project Presentation
Predicting Employee Churn: A Data-Driven Approach Project PresentationPredicting Employee Churn: A Data-Driven Approach Project Presentation
Predicting Employee Churn: A Data-Driven Approach Project Presentation
 
B2 Creative Industry Response Evaluation.docx
B2 Creative Industry Response Evaluation.docxB2 Creative Industry Response Evaluation.docx
B2 Creative Industry Response Evaluation.docx
 
Industrialised data - the key to AI success.pdf
Industrialised data - the key to AI success.pdfIndustrialised data - the key to AI success.pdf
Industrialised data - the key to AI success.pdf
 
定制英国白金汉大学毕业证(UCB毕业证书) 成绩单原版一比一
定制英国白金汉大学毕业证(UCB毕业证书)																			成绩单原版一比一定制英国白金汉大学毕业证(UCB毕业证书)																			成绩单原版一比一
定制英国白金汉大学毕业证(UCB毕业证书) 成绩单原版一比一
 
High Class Call Girls Noida Sector 39 Aarushi 🔝8264348440🔝 Independent Escort...
High Class Call Girls Noida Sector 39 Aarushi 🔝8264348440🔝 Independent Escort...High Class Call Girls Noida Sector 39 Aarushi 🔝8264348440🔝 Independent Escort...
High Class Call Girls Noida Sector 39 Aarushi 🔝8264348440🔝 Independent Escort...
 
100-Concepts-of-AI by Anupama Kate .pptx
100-Concepts-of-AI by Anupama Kate .pptx100-Concepts-of-AI by Anupama Kate .pptx
100-Concepts-of-AI by Anupama Kate .pptx
 
VIP High Class Call Girls Jamshedpur Anushka 8250192130 Independent Escort Se...
VIP High Class Call Girls Jamshedpur Anushka 8250192130 Independent Escort Se...VIP High Class Call Girls Jamshedpur Anushka 8250192130 Independent Escort Se...
VIP High Class Call Girls Jamshedpur Anushka 8250192130 Independent Escort Se...
 
Delhi 99530 vip 56974 Genuine Escort Service Call Girls in Kishangarh
Delhi 99530 vip 56974 Genuine Escort Service Call Girls in  KishangarhDelhi 99530 vip 56974 Genuine Escort Service Call Girls in  Kishangarh
Delhi 99530 vip 56974 Genuine Escort Service Call Girls in Kishangarh
 
VIP Call Girls in Amravati Aarohi 8250192130 Independent Escort Service Amravati
VIP Call Girls in Amravati Aarohi 8250192130 Independent Escort Service AmravatiVIP Call Girls in Amravati Aarohi 8250192130 Independent Escort Service Amravati
VIP Call Girls in Amravati Aarohi 8250192130 Independent Escort Service Amravati
 
Full night 🥵 Call Girls Delhi New Friends Colony {9711199171} Sanya Reddy ✌️o...
Full night 🥵 Call Girls Delhi New Friends Colony {9711199171} Sanya Reddy ✌️o...Full night 🥵 Call Girls Delhi New Friends Colony {9711199171} Sanya Reddy ✌️o...
Full night 🥵 Call Girls Delhi New Friends Colony {9711199171} Sanya Reddy ✌️o...
 
Log Analysis using OSSEC sasoasasasas.pptx
Log Analysis using OSSEC sasoasasasas.pptxLog Analysis using OSSEC sasoasasasas.pptx
Log Analysis using OSSEC sasoasasasas.pptx
 
Saket, (-DELHI )+91-9654467111-(=)CHEAP Call Girls in Escorts Service Saket C...
Saket, (-DELHI )+91-9654467111-(=)CHEAP Call Girls in Escorts Service Saket C...Saket, (-DELHI )+91-9654467111-(=)CHEAP Call Girls in Escorts Service Saket C...
Saket, (-DELHI )+91-9654467111-(=)CHEAP Call Girls in Escorts Service Saket C...
 
꧁❤ Aerocity Call Girls Service Aerocity Delhi ❤꧂ 9999965857 ☎️ Hard And Sexy ...
꧁❤ Aerocity Call Girls Service Aerocity Delhi ❤꧂ 9999965857 ☎️ Hard And Sexy ...꧁❤ Aerocity Call Girls Service Aerocity Delhi ❤꧂ 9999965857 ☎️ Hard And Sexy ...
꧁❤ Aerocity Call Girls Service Aerocity Delhi ❤꧂ 9999965857 ☎️ Hard And Sexy ...
 

How to run appache spark on windows(in sbt console)

  • 1. How to run Appache Spark on Windows(in SBT console) ANKITKUMAR KANERI EMAIL: KANERI776@GMAIL.COM
  • 2. Agenda • Requirements • Creating a Maven compliant folder structure • Testing • Useful Links
  • 3. Requirements: • Computer system with windows • OS 7/8/10 • SBT console installed • Scala(I used 2.10.6) • Java(version used 1.8.0_181)
  • 4. Creating a Maven compliant folder structure Please follow the below steps: 1. Go to any directory in windows and create below folder structure Ex: C:User(systemname) 2. Create folder of any name(I created as ie_spark) and create sub- folder shown below strutucre
  • 5. Ex: C:Users(systemname)ie_sparksrcmainscala 3. Create file called build.sbt and below content in that file and place that file in the following path Ex: C:Users(systemname)ie_spark • Content of build.sbt file is as follows: name := "ie_spark_example" version := "0.1.1" scalaVersion := "2.10.6“ //(my scala version is 2.10.6) libraryDependencies += "org.apache.spark" % "spark-core_2.10" % "1.6.2“ • Basically we are specifying instructions for SBT to resolve the library dependencies that you mentioned in the build.sbt.
  • 6. • When you “compile” scala code using SBT, it looks into build.sbt to see what dependencies are needed and it will go the specific repositories and will download them so that when your program needs them, they are there. • So basically we are saying that your scala program that you’re gonna use will require Apache Spark Core libraries. So SBT will then go to maven repository to grab this library along with all of its dependencies.
  • 7. • Now go to command prompt and perform the following steps: 1. Change directory to ie_spark . Use following command to change the directory. cd C:Users(systemname)scaladie_spark 2. Use command sbt console and enter
  • 8. • You first create a Spark Conf object where you also specify the Spark mode. As you are executing it on your lonely laptop, so you will specify “local” mode here. val conf=new org.apache.spark.SparkConf().setAppName("IE SPARK").setMaster("local") and the next step is to create Spark Context (the entry point to use Spark Cluster and its APIs) using the conf object: val sc=new org.apache.spark.SparkContext(conf)
  • 9. Figure shows the creating configuration and initializing spark context
  • 10. Testing: • Attached video for your reference, where it shows Spark Context is working as expected. • You can also check by using the below code: scala> val parallel = sc.parallelize(Array("Ankit", "Vinay")) // one input parallel: org.apache.spark.rdd.RDD[String] = ParallelCollectionRDD[27] at parallelize at <console>:24 scala> val par2 = sc.parallelize(Array("praveen", "Raju", "Ankit")) // sec input par2: org.apache.spark.rdd.RDD[String] = ParallelCollectionRDD[28] at parallelize at <console>:24 scala> parallel.union(par2).collect res21: Array[String] = Array(Ankit,Vinay, praveen, Raju)//union output scala> parallel.intersection(par2).collect res21: Array[String] = Array(Ankit)//intersection output
  • 11. Useful Links: • Youtube Channel: https://www.youtube.com/channel/UCRzsq7k4-kT- h3TDUBQ82-w • Apache Spark: https://spark.apache.org/documentation.html • Hortonworks: https://hortonworks.com/apache/spark/ • GitHub: https://github.com/apache/spark • Cloudera: https://www.cloudera.com/products/open-source/apache- hadoop/apache-spark.html • Databrick: https://databricks.com/spark/about