However unlikely, you maybe still haven't purchased the book, so here's the link: Spark in Action. Use the coupon code bonaci39 for 39% off.
BTW, you don't need to try bonaci100, it won't work :)
Thanks
File > New > Project... > Maven > Maven Project- Click
Nexton the first screen of the New project wizard - Select
Configure... > Add Remote Catalog... - Enter the following URL in the
Catalog filefield: https://github.com/spark-in-action/scala-archetype-sparkinaction/raw/master/archetype-catalog.xml
EnterSpark in Actionin theDescriptionfield - After you close the dialog, choose the
Spark in Actioncatalog in theCatalogdropdown list - In the next dialog simply enter you project details and confirm with
Finish. In case of problems with this step (such as IDE not being able to locate the POM file) try to use a different URL in the step 4: https://raw.githubusercontent.com/spark-in-action/scala-archetype-sparkinaction/master/archetype-catalog.xml - Once the new projects generates change the Scala version to 2.10.5:
Right click on the generated project and select:
Scala > Set the Scala Installation > Fixed Scala Installation 2.10.5.(bundled)
File > New > Project... > Maven- Select
Create from Archetypeand click onAdd Archetypebutton - Fill-in the
Add archetypedialog:GroupId:org.sparkinactionArtifactId:scala-archetype-sparkinactionVersion:0.13Repository:https://github.com/spark-in-action/scala-archetype-sparkinaction/raw/masterAnd confirm with OK.
- In the list of archetypes, find
org.sparkinaction, the one that you just added, expand it and select the archetype with the version and clickNext - Enter parameters for your new project:
GroupId:org.siaArtifactId:chapter-03-appVersion:0.1-SNAPSHOT
- In the next screen, just confirm with
Next - In the last screen, enter
Chapter03Appas the project name and clickFinish
mvn archetype:generate \
-DarchetypeCatalog=https://github.com/spark-in-action/scala-archetype-sparkinaction/raw/master/archetype-catalog.xml \
-DarchetypeRepository=https://github.com/spark-in-action/scala-archetype-sparkinaction/raw/mastermvn archetype:generate -B \
-DarchetypeCatalog=https://github.com/spark-in-action/scala-archetype-sparkinaction/raw/master/archetype-catalog.xml \
-DarchetypeRepository=https://github.com/spark-in-action/scala-archetype-sparkinaction/raw/master \
-DarchetypeGroupId=org.sparkinaction \
-DarchetypeArtifactId=scala-archetype-sparkinaction \
-DarchetypeVersion=0.13 \
-DgroupId=com.sia -DartifactId=chapter03App -Dversion=0.1-SNAPSHOT -Dpackage=com.sia(run mvn scala:help for the full list of commands)
In Eclipse, you can run the generated project by simply doing Shift+Alt+x s (while positioned in App.scala), which is the shortcut for Run As > Scala Application.
You can also run it from the command line or from Eclipse Maven Run configuration with these goals (adjust main class if needed):
mvn scala:compile
mvn scala:run -DmainClass=com.sia.Chapter03AppIf you choose to purchase the book, thank you :)
