Skip to content

Commit

Permalink
commit message
Browse files Browse the repository at this point in the history
  • Loading branch information
admin committed Feb 26, 2019
1 parent c0889e2 commit 3e41004
Show file tree
Hide file tree
Showing 2 changed files with 23 additions and 25 deletions.
28 changes: 13 additions & 15 deletions intl.en-US/Developer Guide/Preparations/Use sample projects.md
Original file line number Diff line number Diff line change
Expand Up @@ -106,18 +106,16 @@ spark-submit --class ONSSample examples-1.0-SNAPSHOT-shaded.jar <accessKeyId>

- accessKeySecret: Alibaba Cloud AccessKey Secret.

- consumerId: See [Consumer ID description](https://www.alibabacloud.com/help/zh/doc-detail/29533.htm).

- topic: Each message queue has a topic.

- subExpression: See [Message filtering](https://www.alibabacloud.com/help/zh/doc-detail/29543.htm).

- parallelism: Specifies the number of receivers to consume messages in the queue.

- ODPSSample:
- MaxComputeSample:

```
spark-submit --class ODPSSample examples-1.0-SNAPSHOT-shaded.jar <accessKeyId>
spark-submit --class MaxComputeSample examples-1.0-SNAPSHOT-shaded.jar <accessKeyId>
<accessKeySecret> <envType> <project> <table> <numPartitions>
```

Expand All @@ -129,7 +127,7 @@ spark-submit --class ODPSSample examples-1.0-SNAPSHOT-shaded.jar <accessKeyId>

- envType: 0 indicates the public network, and 1 indicates the private network. Select 0 for local debugging, and select 1 for execution on E-MapReduce.

- project: see [ODPS Quick Start](../../SP_76/DNODPS1871666/EN-US_TP_11945.dita#concept_qbk_1kv_tdb).
- project: see [MaxCompute Quick Start](../../SP_76/DNODPS1871666/EN-US_TP_11945.dita#concept_qbk_1kv_tdb).

- numPartition: The number of RDD partitions of the input data.

Expand Down Expand Up @@ -244,24 +242,24 @@ Here we describe how to run a Spark program locally to visit Alibaba Cloud's dat
- Development process
1. Double-click to enter SparkWordCount.scala.

![](http://static-aliyun-doc.oss-cn-hangzhou.aliyuncs.com/assets/img/17968/154752301913087_en-US.jpg)
![](http://static-aliyun-doc.oss-cn-hangzhou.aliyuncs.com/assets/img/17968/155116965013087_en-US.jpg)

2. Enter the job configuration page from the arrow as shown in the following figure.

![](http://static-aliyun-doc.oss-cn-hangzhou.aliyuncs.com/assets/img/17968/154752301913088_en-US.jpg)
![](http://static-aliyun-doc.oss-cn-hangzhou.aliyuncs.com/assets/img/17968/155116965113088_en-US.jpg)

3. Select SparkWordCount and enter the required job parameters in the job parameter box.

![](http://static-aliyun-doc.oss-cn-hangzhou.aliyuncs.com/assets/img/17968/154752301913089_en-US.jpg)
![](http://static-aliyun-doc.oss-cn-hangzhou.aliyuncs.com/assets/img/17968/155116965113089_en-US.jpg)

4. Click **OK**.
5. Click Run to run the job.

![](http://static-aliyun-doc.oss-cn-hangzhou.aliyuncs.com/assets/img/17968/154752301913090_en-US.jpg)
![](http://static-aliyun-doc.oss-cn-hangzhou.aliyuncs.com/assets/img/17968/155116965113090_en-US.jpg)

6. View job logs

![](http://static-aliyun-doc.oss-cn-hangzhou.aliyuncs.com/assets/img/17968/154752301913091_en-US.jpg)
![](http://static-aliyun-doc.oss-cn-hangzhou.aliyuncs.com/assets/img/17968/155116965113091_en-US.jpg)

- Scala IDE for Eclipse
- Preparations
Expand All @@ -271,21 +269,21 @@ Here we describe how to run a Spark program locally to visit Alibaba Cloud's dat
- Development process
1. Import a project as described in the figure below:

![](http://static-aliyun-doc.oss-cn-hangzhou.aliyuncs.com/assets/img/17968/154752301913093_en-US.jpg)
![](http://static-aliyun-doc.oss-cn-hangzhou.aliyuncs.com/assets/img/17968/155116965113093_en-US.jpg)

![](http://static-aliyun-doc.oss-cn-hangzhou.aliyuncs.com/assets/img/17968/154752302013094_en-US.jpg)
![](http://static-aliyun-doc.oss-cn-hangzhou.aliyuncs.com/assets/img/17968/155116965113094_en-US.jpg)

![](http://static-aliyun-doc.oss-cn-hangzhou.aliyuncs.com/assets/img/17968/154752302013095_en-US.jpg)
![](http://static-aliyun-doc.oss-cn-hangzhou.aliyuncs.com/assets/img/17968/155116965113095_en-US.jpg)

2. The shortcut for Run as Maven build is Alt + Shift + X, M. You can also right-click the project name and choose **Run As** \> **Maven build**.
3. Right-click on the job to run after it has been compiled, select **Run Configuration** to enter the configuration page.
4. In the configuration page, select Scala Application and configure the Main Class and parameters of the job, As shown in the following figure:

![](http://static-aliyun-doc.oss-cn-hangzhou.aliyuncs.com/assets/img/17968/154752302013097_en-US.jpg)
![](http://static-aliyun-doc.oss-cn-hangzhou.aliyuncs.com/assets/img/17968/155116965113097_en-US.jpg)

5. Click **Run**.
6. View the output log of the console, as shown in the following figure:

![](http://static-aliyun-doc.oss-cn-hangzhou.aliyuncs.com/assets/img/17968/154752302013098_en-US.jpg)
![](http://static-aliyun-doc.oss-cn-hangzhou.aliyuncs.com/assets/img/17968/155116965113098_en-US.jpg)


20 changes: 10 additions & 10 deletions intl.zh-CN/开发指南/准备/示例项目使用说明.md
Original file line number Diff line number Diff line change
Expand Up @@ -242,24 +242,24 @@ pig -x mapreduce -f sample.pig -param tutorial=<tutorialJarPath> -param
- 开发流程
1. 双击进入 SparkWordCount.scala。

![](http://static-aliyun-doc.oss-cn-hangzhou.aliyuncs.com/assets/img/17968/154745427413087_zh-CN.jpg)
![](http://static-aliyun-doc.oss-cn-hangzhou.aliyuncs.com/assets/img/17968/155116964713087_zh-CN.jpg)

2. 从下图箭头所指处进入作业配置界面。

![](http://static-aliyun-doc.oss-cn-hangzhou.aliyuncs.com/assets/img/17968/154745427413088_zh-CN.jpg)
![](http://static-aliyun-doc.oss-cn-hangzhou.aliyuncs.com/assets/img/17968/155116964713088_zh-CN.jpg)

3. 选择 SparkWordCount,在作业参数框中按照所需传入作业参数。

![](http://static-aliyun-doc.oss-cn-hangzhou.aliyuncs.com/assets/img/17968/154745427413089_zh-CN.jpg)
![](http://static-aliyun-doc.oss-cn-hangzhou.aliyuncs.com/assets/img/17968/155116964713089_zh-CN.jpg)

4. 单击 **OK**
5. 单击运行按钮,执行作业。

![](http://static-aliyun-doc.oss-cn-hangzhou.aliyuncs.com/assets/img/17968/154745427413090_zh-CN.jpg)
![](http://static-aliyun-doc.oss-cn-hangzhou.aliyuncs.com/assets/img/17968/155116964713090_zh-CN.jpg)

6. 查看作业执行日志

![](http://static-aliyun-doc.oss-cn-hangzhou.aliyuncs.com/assets/img/17968/154745427413091_zh-CN.jpg)
![](http://static-aliyun-doc.oss-cn-hangzhou.aliyuncs.com/assets/img/17968/155116964713091_zh-CN.jpg)

- Scala IDE for Eclipse
- 准备工作
Expand All @@ -269,21 +269,21 @@ pig -x mapreduce -f sample.pig -param tutorial=<tutorialJarPath> -param
- 开发流程
1. 请根据以下图示导入项目。

![](http://static-aliyun-doc.oss-cn-hangzhou.aliyuncs.com/assets/img/17968/154745427413093_zh-CN.jpg)
![](http://static-aliyun-doc.oss-cn-hangzhou.aliyuncs.com/assets/img/17968/155116964713093_zh-CN.jpg)

![](http://static-aliyun-doc.oss-cn-hangzhou.aliyuncs.com/assets/img/17968/154745427413094_zh-CN.jpg)
![](http://static-aliyun-doc.oss-cn-hangzhou.aliyuncs.com/assets/img/17968/155116964713094_zh-CN.jpg)

![](http://static-aliyun-doc.oss-cn-hangzhou.aliyuncs.com/assets/img/17968/154745427413095_zh-CN.jpg)
![](http://static-aliyun-doc.oss-cn-hangzhou.aliyuncs.com/assets/img/17968/155116964713095_zh-CN.jpg)

2. Run As Maven build,快捷键是 Alt + Shilft + X, M;也可以在项目名上右键,**Run As** \> **Maven build**
3. 等待编译完后,在需要运行的作业上右键,选择 **Run Configuration**,进入配置页。
4. 在配置页中,选择 Scala Application,并配置作业的 Main Class 和参数等等。如下图所示:

![](http://static-aliyun-doc.oss-cn-hangzhou.aliyuncs.com/assets/img/17968/154745427513097_zh-CN.jpg)
![](http://static-aliyun-doc.oss-cn-hangzhou.aliyuncs.com/assets/img/17968/155116964713097_zh-CN.jpg)

5. 单击**Run**
6. 查看控制台输出日志,如下图所示:

![](http://static-aliyun-doc.oss-cn-hangzhou.aliyuncs.com/assets/img/17968/154745427513098_zh-CN.jpg)
![](http://static-aliyun-doc.oss-cn-hangzhou.aliyuncs.com/assets/img/17968/155116964713098_zh-CN.jpg)


0 comments on commit 3e41004

Please sign in to comment.