Skip to content

Commit 24e9f33

Browse files
authored
Merge pull request #88453 from dagiro/cats87
cats87
2 parents 0d62590 + c458eca commit 24e9f33

26 files changed

+48
-49
lines changed

articles/hdinsight/spark/apache-spark-intellij-tool-plugin.md

Lines changed: 48 additions & 49 deletions
Original file line numberDiff line numberDiff line change
@@ -41,8 +41,8 @@ Perform the following steps to install the Scala plugin:
4141
1. Open IntelliJ IDEA.
4242

4343
2. On the welcome screen, navigate to **Configure** > **Plugins** to open the **Plugins** window.
44-
45-
![Enable scala plugin](./media/apache-spark-intellij-tool-plugin/enable-scala-plugin.png)
44+
45+
![Enable scala plugin](./media/apache-spark-intellij-tool-plugin/enable-scala-plugin1.png)
4646

4747
3. Select **Install** for the Scala plugin that is featured in the new window.
4848

@@ -75,7 +75,7 @@ Perform the following steps to install the Scala plugin:
7575
|Project SDK| This might be blank on your first use of IDEA. Select **New...** and navigate to your JDK.|
7676
|Spark Version|The creation wizard integrates the proper version for Spark SDK and Scala SDK. If the Spark cluster version is earlier than 2.0, select **Spark 1.x**. Otherwise, select **Spark2.x**. This example uses **Spark 2.3.0 (Scala 2.11.8)**.|
7777

78-
![Selecting the Spark SDK](./media/apache-spark-intellij-tool-plugin/hdi-new-project.png)
78+
![Selecting the Spark SDK](./media/apache-spark-intellij-tool-plugin/intellij-new-project.png)
7979

8080
7. Select **Finish**. It may take a few minutes before the project becomes available.
8181

@@ -87,7 +87,7 @@ Perform the following steps to install the Scala plugin:
8787

8888
c. Select **Cancel** after viewing the artifact.
8989

90-
![Artifact info in the dialog box](./media/apache-spark-intellij-tool-plugin/default-artifact.png)
90+
![Artifact info in the dialog box](./media/apache-spark-intellij-tool-plugin/default-artifact-dialog.png)
9191

9292
9. Add your application source code by doing the following:
9393

@@ -129,52 +129,52 @@ User can either [sign in to Azure subscription](#sign-in-to-your-azure-subscript
129129
### Sign in to your Azure subscription
130130

131131
1. From the menu bar, navigate to **View** > **Tool Windows** > **Azure Explorer**.
132-
133-
![show azure explorer](./media/apache-spark-intellij-tool-plugin/show-azure-explorer.png)
132+
133+
![show azure explorer](./media/apache-spark-intellij-tool-plugin/show-azure-explorer1.png)
134134

135135
2. From Azure Explorer, right-click the **Azure** node, and then select **Sign In**.
136-
136+
137137
![explorer right-click azure](./media/apache-spark-intellij-tool-plugin/explorer-rightclick-azure.png)
138138

139139
3. In the **Azure Sign In** dialog box, choose **Device Login**, and then select **Sign in**.
140140

141-
![view explorer 2](./media/apache-spark-intellij-tool-plugin/view-explorer-2.png)
141+
![view explorer 2](./media/apache-spark-intellij-tool-plugin/intellij-view-explorer2.png)
142142

143143
4. In the **Azure Device Login** dialog box, click **Copy&Open**.
144-
145-
![view explorer 5](./media/apache-spark-intellij-tool-plugin/view-explorer-5.png)
144+
145+
![view explorer 5](./media/apache-spark-intellij-tool-plugin/intellij-view-explorer5.png)
146146

147147
5. In the browser interface, paste the code, and then click **Next**.
148-
149-
![view explorer 6](./media/apache-spark-intellij-tool-plugin/view-explorer-6.png)
148+
149+
![view explorer 6](./media/apache-spark-intellij-tool-plugin/intellij-view-explorer6.png)
150150

151151
6. Enter your Azure credentials, and then close the browser.
152-
153-
![view explorer 7](./media/apache-spark-intellij-tool-plugin/view-explorer-7.png)
152+
153+
![view explorer 7](./media/apache-spark-intellij-tool-plugin/intellij-view-explorer7.png)
154154

155155
7. After you're signed in, the **Select Subscriptions** dialog box lists all the Azure subscriptions that are associated with the credentials. Select your subscription and then select the **Select** button.
156156

157157
![The Select Subscriptions dialog box](./media/apache-spark-intellij-tool-plugin/Select-Subscriptions.png)
158158

159159
8. From **Azure Explorer**, expand **HDInsight** to view the HDInsight Spark clusters that are in your subscriptions.
160160

161-
![view explorer 3](./media/apache-spark-intellij-tool-plugin/view-explorer-3.png)
161+
![view explorer 3](./media/apache-spark-intellij-tool-plugin/intellij-view-explorer3.png)
162162

163-
9. To view the resources (for example, storage accounts) that are associated with the cluster, you can further expand a cluster-name node.
163+
9. To view the resources (for example, storage accounts) that are associated with the cluster, you can further expand a cluster-name node.
164164

165-
![An expanded cluster-name node](./media/apache-spark-intellij-tool-plugin/view-explorer-4.png)
165+
![An expanded cluster-name node](./media/apache-spark-intellij-tool-plugin/intellij-view-explorer4.png)
166166

167167
### Link a cluster
168168

169169
You can link an HDInsight cluster by using the Apache Ambari managed username. Similarly, for a domain-joined HDInsight cluster, you can link by using the domain and username, such as `[email protected]`. Also you can link Livy Service cluster.
170170

171171
1. From the menu bar, navigate to **View** > **Tool Windows** > **Azure Explorer**.
172172

173-
2. From Azure Explorer, right-click the **HDInsight** node, and then select **Link A Cluster**.
173+
1. From Azure Explorer, right-click the **HDInsight** node, and then select **Link A Cluster**.
174174

175175
![link cluster context menu](./media/apache-spark-intellij-tool-plugin/link-a-cluster-context-menu.png)
176176

177-
3. The available options in the **Link A Cluster** window will vary depending on which value you select from the **Link Resource Type** drop-down list. Enter your values and then select **OK**.
177+
1. The available options in the **Link A Cluster** window will vary depending on which value you select from the **Link Resource Type** drop-down list. Enter your values and then select **OK**.
178178

179179
* **HDInsight Cluster**
180180

@@ -185,7 +185,7 @@ You can link an HDInsight cluster by using the Apache Ambari managed username. S
185185
|Authentication Type| Leave as **Basic Authentication**|
186186
|User Name| Enter cluster user name, default is admin.|
187187
|Password| Enter password for user name.|
188-
188+
189189
![link HDInsight cluster dialog](./media/apache-spark-intellij-tool-plugin/link-hdinsight-cluster-dialog.png)
190190

191191
* **Livy Service**
@@ -204,9 +204,9 @@ You can link an HDInsight cluster by using the Apache Ambari managed username. S
204204

205205
1. You can see your linked cluster from the **HDInsight** node.
206206

207-
![linked cluster](./media/apache-spark-intellij-tool-plugin/linked-cluster.png)
207+
![linked cluster](./media/apache-spark-intellij-tool-plugin/hdinsight-linked-cluster.png)
208208

209-
2. You also can unlink a cluster from **Azure Explorer**.
209+
1. You also can unlink a cluster from **Azure Explorer**.
210210

211211
![unlinked cluster](./media/apache-spark-intellij-tool-plugin/hdi-unlinked-cluster.png)
212212

@@ -215,7 +215,7 @@ You can link an HDInsight cluster by using the Apache Ambari managed username. S
215215
After creating a Scala application, you can submit it to the cluster.
216216

217217
1. From Project, navigate to **myApp** > **src** > **main** > **scala** > **myApp**. Right-click **myApp**, and select **Submit Spark Application** (It will likely be located at the bottom of the list).
218-
218+
219219
![The Submit Spark Application to HDInsight command](./media/apache-spark-intellij-tool-plugin/hdi-submit-spark-app-1.png)
220220

221221
2. In the **Submit Spark Application** dialog window, select **1. Spark on HDInsight**.
@@ -239,7 +239,7 @@ After creating a Scala application, you can submit it to the cluster.
239239
![The Spark Submission dialog box](./media/apache-spark-intellij-tool-plugin/hdi-submit-spark-app-02.png)
240240

241241
4. Select **SparkJobRun** to submit your project to the selected cluster. The **Remote Spark Job in Cluster** tab displays the job execution progress at the bottom. You can stop the application by clicking the red button. To learn how to access the job output, see the "Access and manage HDInsight Spark clusters by using Azure Toolkit for IntelliJ" section later in this article.
242-
242+
243243
![The Spark Submission window](./media/apache-spark-intellij-tool-plugin/hdi-spark-app-result.png)
244244

245245
## Debug Apache Spark applications locally or remotely on an HDInsight cluster
@@ -254,19 +254,19 @@ You can perform various operations by using Azure Toolkit for IntelliJ. Most of
254254

255255
1. From Azure Explorer, navigate to **HDInsight** > \<Your Cluster> > **Jobs**.
256256

257-
![Job view node](./media/apache-spark-intellij-tool-plugin/job-view-node.png)
257+
![Job view node](./media/apache-spark-intellij-tool-plugin/intellij-job-view-node.png)
258258

259259
2. In the right pane, the **Spark Job View** tab displays all the applications that were run on the cluster. Select the name of the application for which you want to see more details.
260260

261-
![Application details](./media/apache-spark-intellij-tool-plugin/view-job-logs.png)
261+
![Application details](./media/apache-spark-intellij-tool-plugin/intellij-view-job-logs.png)
262262

263263
3. To display basic running job information, hover over the job graph. To view the stages graph and information that every job generates, select a node on the job graph.
264264

265265
![Job stage details](./media/apache-spark-intellij-tool-plugin/Job-graph-stage-info.png)
266266

267267
4. To view frequently used logs, such as *Driver Stderr*, *Driver Stdout*, and *Directory Info*, select the **Log** tab.
268268

269-
![Log details](./media/apache-spark-intellij-tool-plugin/Job-log-info.png)
269+
![Log details](./media/apache-spark-intellij-tool-plugin/intellij-job-log-info.png)
270270

271271
5. You can also view the Spark history UI and the YARN UI (at the application level) by selecting a link at the top of the window.
272272

@@ -321,9 +321,9 @@ Ensure you have satisfied the WINUTILS.EXE prerequisite.
321321

322322
7. Then two dialogs may be displayed to ask you if you want to auto fix dependencies. If so, select **Auto Fix**.
323323

324-
![Spark Auto Fix1](./media/apache-spark-intellij-tool-plugin/console-auto-fix1.png)
324+
![Spark Auto Fix1](./media/apache-spark-intellij-tool-plugin/intellij-console-autofix1.png)
325325

326-
![Spark Auto Fix2](./media/apache-spark-intellij-tool-plugin/console-auto-fix2.png)
326+
![Spark Auto Fix2](./media/apache-spark-intellij-tool-plugin/intellij-console-autofix2.png)
327327

328328
8. The console should look similar to the picture below. In the console window type `sc.appName`, and then press ctrl+Enter. The result will be shown. You can terminate the local console by clicking red button.
329329

@@ -369,50 +369,49 @@ When users submit job to a cluster with reader-only role permission, Ambari cred
369369
### Link cluster from context menu
370370

371371
1. Sign in with reader-only role account.
372-
372+
373373
2. From **Azure Explorer**, expand **HDInsight** to view HDInsight clusters that are in your subscription. The clusters marked **"Role:Reader"** only have reader-only role permission.
374374

375-
![view explorer 15](./media/apache-spark-intellij-tool-plugin/view-explorer-15.png)
375+
![view explorer 15](./media/apache-spark-intellij-tool-plugin/intellij-view-explorer15.png)
376376

377377
3. Right-click the cluster with reader-only role permission. Select **Link this cluster** from context menu to link cluster. Enter the Ambari username and Password.
378378

379-
380-
![view explorer 11](./media/apache-spark-intellij-tool-plugin/view-explorer-11.png)
379+
![view explorer 11](./media/apache-spark-intellij-tool-plugin/intellij-view-explorer11.png)
381380

382381
4. If the cluster is linked successfully, HDInsight will be refreshed.
383382
The stage of the cluster will become linked.
384383

385-
![view explorer 8](./media/apache-spark-intellij-tool-plugin/view-explorer-8.png)
384+
![view explorer 8](./media/apache-spark-intellij-tool-plugin/intellij-view-explorer8.png)
386385

387386
### Link cluster by expanding Jobs node
388387

389388
1. Click **Jobs** node, **Cluster Job Access Denied** window pops up.
390-
389+
391390
2. Click **Link this cluster** to link cluster.
392-
393-
![view explorer 9](./media/apache-spark-intellij-tool-plugin/view-explorer-9.png)
391+
392+
![view explorer 9](./media/apache-spark-intellij-tool-plugin/intellij-view-explorer9.png)
394393

395394
### Link cluster from Run/Debug Configurations window
396395

397396
1. Create an HDInsight Configuration. Then select **Remotely Run in Cluster**.
398-
397+
399398
2. Select a cluster, which has reader-only role permission for **Spark clusters(Linux only)**. Warning message shows out. You can Click **Link this cluster** to link cluster.
400-
401-
![create config 1](./media/apache-spark-intellij-tool-plugin/create-config-1.png)
402-
399+
400+
![create config 1](./media/apache-spark-intellij-tool-plugin/create-configuration.png)
401+
403402
### View Storage Accounts
404403

405404
* For clusters with reader-only role permission, click **Storage Accounts** node, **Storage Access Denied** window pops up. You can click **Open Azure Storage Explorer** to open Storage Explorer.
406-
407-
![view explorer 14](./media/apache-spark-intellij-tool-plugin/view-explorer-14.png)
408405

409-
![view explorer 10](./media/apache-spark-intellij-tool-plugin/view-explorer-10.png)
406+
![view explorer 14](./media/apache-spark-intellij-tool-plugin/intellij-view-explorer14.png)
407+
408+
![view explorer 10](./media/apache-spark-intellij-tool-plugin/intellij-view-explorer10.png)
410409

411410
* For linked clusters, click **Storage Accounts** node, **Storage Access Denied** window pops up. You can click **Open Azure Storage** to open Storage Explorer.
412-
413-
![view explorer 13](./media/apache-spark-intellij-tool-plugin/view-explorer-13.png)
414411

415-
![view explorer 12](./media/apache-spark-intellij-tool-plugin/view-explorer-12.png)
412+
![view explorer 13](./media/apache-spark-intellij-tool-plugin/intellij-view-explorer13.png)
413+
414+
![view explorer 12](./media/apache-spark-intellij-tool-plugin/intellij-view-explorer12.png)
416415

417416
## Convert existing IntelliJ IDEA applications to use Azure Toolkit for IntelliJ
418417

@@ -421,11 +420,11 @@ You can convert the existing Spark Scala applications that you created in Intell
421420
1. For an existing Spark Scala application that was created through IntelliJ IDEA, open the associated .iml file.
422421

423422
2. At the root level is a **module** element like the following:
424-
423+
425424
<module org.jetbrains.idea.maven.project.MavenProjectsManager.isMavenModule="true" type="JAVA_MODULE" version="4">
426425

427426
Edit the element to add `UniqueKey="HDInsightTool"` so that the **module** element looks like the following:
428-
427+
429428
<module org.jetbrains.idea.maven.project.MavenProjectsManager.isMavenModule="true" type="JAVA_MODULE" version="4" UniqueKey="HDInsightTool">
430429

431430
3. Save the changes. Your application should now be compatible with Azure Toolkit for IntelliJ. You can test it by right-clicking the project name in Project. The pop-up menu now has the option **Submit Spark Application to HDInsight**.

0 commit comments

Comments
 (0)