![intellij idea scala intellij idea scala](https://i.stack.imgur.com/qyta1.png)
Intellij idea scala code#
The code reads the data from HVAC.csv (available on all HDInsight Spark clusters), retrieves the rows that have only one digit in the seventh column in the CSV file, and writes the output to /HVACOut under the default storage container for the cluster. find the rows that have only one digit in the seventh column in the CSV file Val rdd = sc.textFile("wasbs:///HdiSamples/HdiSamples/SensorSampleData/hvac/HVAC.csv") Val conf = new SparkConf().setAppName("myApp") Replace the default code with the code found below: import The myApp.scala file then opens in the main view. In the Create New Scala Class dialog box, provide a name, select Object in the Kind drop-down list, and then select OK.ĭ. Right-click scala, and then navigate to New > Scala Class.Ĭ. From Project, navigate to myApp > src > main > scala.ī. Select Cancel after viewing the artifact.Īdd your application source code by doing the following steps:Ī. From the Project Structure window, select Artifacts.Ĭ. From the menu bar, navigate to File > Project Structure.ī. To view the artifact, do the following steps:Ī. The Spark project automatically creates an artifact for you. It may take a few minutes before the project becomes available. This example uses Spark 2.3.0 (Scala 2.11.8). If the Spark cluster version is earlier than 2.0, select Spark 1.x. The creation wizard integrates the proper version for Spark SDK and Scala SDK. This field might be blank on your first use of IDEA. In the New Project window, provide the following information: Property SBT for managing the dependencies and building for the Scala project. Maven for Scala project-creation wizard support. Select Spark Project (Scala) from the main window.įrom the Build tool drop-down list, select one of the following options: Select Azure Spark/HDInsight from the left pane. Start IntelliJ IDEA, and select Create New Project to open the New Project window.
Intellij idea scala install#
Select Install for the Scala plugin that is featured in the new window.Īfter the plugin installs successfully, you must restart the IDE.Ĭreate a Spark Scala application for an HDInsight Spark cluster
![intellij idea scala intellij idea scala](http://www.alternatestack.com/wp-content/uploads/2016/03/IntelliJ-IDEA-download.png)
On the welcome screen, navigate to Configure > Plugins to open the Plugins window. See Installing the Azure Toolkit for IntelliJ. This article uses IntelliJ IDEA Community 2018.3.4.Īzure Toolkit for IntelliJ. Only HDInsight clusters in public cloud are supported while other secure cloud types (e.g. For instructions, see Create Apache Spark clusters in Azure HDInsight. Submit an application to Azure HDInsight clusterĪn Apache Spark cluster on HDInsight.Use the Azure Toolkit for IntelliJ plug-in.