![]() Upon successful run, the result should be stored in out.txt folder. Run WordCount.scala as Scala application. Var map = sc.textFile("data/wordcount/input.txt").flatMap(line => line.split(" ")).map(word => (word,1)) Val conf = new SparkConf().setAppName("Spark Scala WordCount Example").setMaster("local") The output folder contains files with result and status (SUCCESS/FAILURE). ![]() The output is generated at root of the Project, or you may change its location as well. The class would be the following example, we provided input placed at data/wordcount/input.txt. Right click on the project and create a new Scala class. Give a try with all the versions available if you have an issue with Scala version. To change scala version of your project : Java Build Path -> Libraries -> Add Library -> Scala Library -> Choose a lower version than the latest and click on Finish. VSC is open source, light weight and enables rapid development. Why VSC Officially supported IDE by Salesforce. In a follow up article we will cover some exciting features of this new IDE. In the Add Repository dialog, set the name to IDE and the location to Click OK. If you get any errors with the scala version of the eclipse, you may change and give a try. This article only covers general salesforce development (connecting to a sandbox / developer org ). Launch Eclipse, go to the Help option and choose the Install New Software option from the drop-down list: Click Add.
0 Comments
Leave a Reply. |
AuthorWrite something about yourself. No need to be fancy, just an overview. ArchivesCategories |