Spark Hello World with Gradle
Prerequisites
- Scala - Basic
- Intellij IDE - Basic
- Gradle installed in your system
- Java 8 installed in your system
1. Create a gradle Project
- Create a Gradle Project using the intellij Idea new project.
- Create a new folder called src/main/scala
- Mark scala directory as source
2. Add the gradle dependencies
Add the following code in your build.gradle
3. Create a scala object
Create a scala object ApplicationMain.
4. Write the hello world code
Under your ApplicationMain object, create a main method and write the below code
5. Run the program locally
Run your spark application by right clicking the ApplicationMain and check the output in your console.
The code is available in Github