- Choose a workspace where the data is stored
- Create a new Scala project
- Give it any name
- Create a new package in the project
- Give a name to the package
- Import files
- General-> File systems
- Browse to directory
- Click the file you want then click finish
- Might get those errors
- Right click project -> properties
- Java build path->Libraries->Add external JARs
- Go to spark folder->Jars->Add all
- There might still be a problem with Scala version
- Project right click properties
- Scala compiler->then change scala installation
- To compile and run. Run->run configurations
- Double click Scala Application -> Give a name to run -> Main class is the name of the package.<object_name>
DO NOT FORGET TO RENAME THE PACKAGE DEFINITION AT THE BEGININNG OF THE FILES!!! package com.abolfadl.spark
YOU COULD HAVE ONLY ONE SCRIPT WITH MAIN, NOT MULTIPLE!!
No comments:
Post a Comment