In the previous tutorial (Environment setup), we created a Scala Maven Project in IntelliJ and set up a work environment for Spark. In this tutorial, we will create a Scala Object to run a testing program of Spark.

We create a Scala Object with the name Test by right-clicking on src/main/scala, select New -> Scala Class, enter Test into Name field and select Object in Kind section). We then use the code below to test Spark

Press Ctr+Shift+F10 to run the program, we get the following result (Note: we can decide what log should be displayed by adding the following line to log4j.properties file or add the code below to the Spark program):

Or

November 15, 2018
ITechSeeker