Skip to content

Commit

Permalink
add docs
Browse files Browse the repository at this point in the history
  • Loading branch information
dcoliversun committed Jul 3, 2024
1 parent b599675 commit b713221
Show file tree
Hide file tree
Showing 6 changed files with 120 additions and 0 deletions.
60 changes: 60 additions & 0 deletions docs/docs/en/guide/task/aliyun-adb-spark.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,60 @@
# Aliyun ADB Spark

## Introduction

`Aliyun ADB Spark` task plugin submits spark application to [`Aliyun ADB Spark`](https://www.alibabacloud.com/help/en/analyticdb-for-mysql/user-guide/spark-app-development/?spm=a2c63.l28256.0.0.7cc67ed0j6gd6b) service.

## Create Datasource

- Click `Datasource -> Create Datasource -> ADBSPARK` to create a datasource.

![demo-create-adbspark-datasource](../../../../img/tasks/demo/aliyun_adb_spark01.png)

- Fill in `Datasource Name`, `Aliyun Access Key Id`, `Aliyun Access Key Secret`, `Aliyun Region Id` and click `Confirm`.

![demo-fill-adbspark-datasource](../../../../img/tasks/demo/aliyun_adb_spark02.png)]

## Create Tasks

- Click `Porject -> Workflow Definition -> Create Workflow` and drag the `ADBSPARK` task to the canvas.

![demo-create-adbspark-task](../../../../img/tasks/demo/aliyun_adb_spark03.png)

- Fill in the task parameters and click `Confirm` to create the task node.

![demo-fill-adbspark-task](../../../../img/tasks/demo/aliyun_adb_spark04.png)

## Task Parameters

- Please refer to [DolphinScheduler Task Parameters Appendix](appendix.md) `Default Task Parameters` section for default parameters.

| **Parameters** | **Description** |
|---------------------------|---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------|
| Datasource types | The type of datasource the task uses, should be `ADBSPARK`. |
| Datasource instances | The instance of `ADBSPARK` datasource. |
| Aliyun ADB Cluster ID | The ID of the AnalyticDB for MySQL Data Lakehouse Edition (V3.0) cluster. |
| Aliyun ADB Resource Group | The name of the job resource group in AnalyticDB for MySQL Data Lakehouse Edition (V3.0) cluster. |
| Aliyun ADB App Type | The type of the application. Valid values: Batch(default), SQL. |
| Aliyun ADB Spark Data | The data of the application template. For information about the application template configuration, see [Spark application configuration guide](https://www.alibabacloud.com/help/en/analyticdb-for-mysql/spark-application-configuration-guide). |

## Examples

### Submit Spark Application

#### Batch Type Application

| **Parameters** | **Example Values / Operations** |
|---------------------------|---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------|
| Aliyun ADB Cluster ID | amv-example |
| Aliyun ADB Resource Group | spark |
| Aliyun ADB App Type | Batch |
| Aliyun ADB Spark Data |{ <br> &nbsp; &nbsp; &nbsp; &nbsp; "comments":&nbsp; [ <br> &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; "--&nbsp; Here&nbsp; is&nbsp; just&nbsp; an&nbsp; example&nbsp; of&nbsp; SparkPi.&nbsp; Modify&nbsp; the&nbsp; content&nbsp; and&nbsp; run&nbsp; your&nbsp; spark&nbsp; program." <br> &nbsp; &nbsp; &nbsp; &nbsp; ], <br> &nbsp; &nbsp; &nbsp; &nbsp; "args":&nbsp; [ <br> &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; "1000" <br> &nbsp; &nbsp; &nbsp; &nbsp; ], <br> &nbsp; &nbsp; &nbsp; &nbsp; "file":&nbsp; "local:///tmp/spark-examples.jar", <br> &nbsp; &nbsp; &nbsp; &nbsp; "name":&nbsp; "SparkPi", <br> &nbsp; &nbsp; &nbsp; &nbsp; "className":&nbsp; "org.apache.spark.examples.SparkPi", <br> &nbsp; &nbsp; &nbsp; &nbsp; "conf":&nbsp; { <br> &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; "spark.driver.resourceSpec":&nbsp; "medium", <br> &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; "spark.executor.instances":&nbsp; 2, <br> &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; "spark.executor.resourceSpec":&nbsp; "medium" <br> &nbsp; &nbsp; &nbsp; &nbsp; } <br> }|

#### SQL Type Application

| **Parameters** | **Example Values / Operations** |
|---------------------------|---------------------------------------------|
| Aliyun ADB Cluster ID | amv-example |
| Aliyun ADB Resource Group | spark |
| Aliyun ADB App Type | Batch |
| Aliyun ADB Spark Data | show databases; <br> select * from example; |
60 changes: 60 additions & 0 deletions docs/docs/zh/guide/task/aliyun-adb-spark.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,60 @@
# Aliyun ADB Spark

## 简介

`阿里云 ADB Spark` 任务插件用于向 [`阿里云 ADB Spark`](https://help.aliyun.com/zh/analyticdb-for-mysql/user-guide/spark-app-development/?spm=a2c4g.11174283.0.0.ef0434f9C9JS8Z) 服务提交作业。

## 创建创建源

- 点击 `数据源 -> 创建数据源 -> ADBSPARK` 创建创建源。

![demo-create-adbspark-connection](../../../../img/tasks/demo/aliyun_adb_spark01.png)

- 填入 `Datasource Name`, `Aliyun Access Key Id`, `Aliyun Access Key Secret`, `Aliyun Region Id` 参数并且点击 `Confirm`

![demo-fill-adbspark-connection](../../../../img/tasks/demo/aliyun_adb_spark02.png)]

## 创建任务节点

- 点击 `Porject -> Workflow Definition -> Create Workflow` 并且将 `ADBSPARK` 任务拖到画板中。

![demo-create-adbspark-task](../../../../img/tasks/demo/aliyun_adb_spark03.png)

- 填入相关任务参数并且点击 `Confirm` 创建任务节点。

![demo-fill-adbspark-task](../../../../img/tasks/demo/aliyun_adb_spark04.png)

## 任务参数

- 默认参数说明请参考[DolphinScheduler任务参数附录](appendix.md)`默认任务参数`一栏。

| **Parameters** | **Description** |
|---------------------------|:--------------------------------------------------------------------------------------------------------------------------------------------------|
| Datasource types | 数据源类型,应该选择 `ADBSPARK`. |
| Datasource instances | `ADBSPARK` 数据源实例. |
| Aliyun ADB Cluster ID | AnalyticDB MySQL 湖仓版(3.0)集群 ID。 |
| Aliyun ADB Resource Group | Job 型资源组名称。 |
| Aliyun ADB App Type | 应用类型,取值说明:Batch(默认值), SQL。 |
| Aliyun ADB Spark Data | 应用模板数据。应用模板配置,请参见[《Spark 应用配置指南》](https://help.aliyun.com/zh/analyticdb-for-mysql/spark-application-configuration-guide?spm=a2c4g.11186623.0.i18)|

## 示例

### 提交 Spark 应用

#### Batch 类型应用

| **Parameters** | **Example Values / Operations** |
|---------------------------|---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------|
| Aliyun ADB Cluster ID | amv-example |
| Aliyun ADB Resource Group | spark |
| Aliyun ADB App Type | Batch |
| Aliyun ADB Spark Data |{ <br> &nbsp; &nbsp; &nbsp; &nbsp; "comments":&nbsp; [ <br> &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; "--&nbsp; Here&nbsp; is&nbsp; just&nbsp; an&nbsp; example&nbsp; of&nbsp; SparkPi.&nbsp; Modify&nbsp; the&nbsp; content&nbsp; and&nbsp; run&nbsp; your&nbsp; spark&nbsp; program." <br> &nbsp; &nbsp; &nbsp; &nbsp; ], <br> &nbsp; &nbsp; &nbsp; &nbsp; "args":&nbsp; [ <br> &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; "1000" <br> &nbsp; &nbsp; &nbsp; &nbsp; ], <br> &nbsp; &nbsp; &nbsp; &nbsp; "file":&nbsp; "local:///tmp/spark-examples.jar", <br> &nbsp; &nbsp; &nbsp; &nbsp; "name":&nbsp; "SparkPi", <br> &nbsp; &nbsp; &nbsp; &nbsp; "className":&nbsp; "org.apache.spark.examples.SparkPi", <br> &nbsp; &nbsp; &nbsp; &nbsp; "conf":&nbsp; { <br> &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; "spark.driver.resourceSpec":&nbsp; "medium", <br> &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; "spark.executor.instances":&nbsp; 2, <br> &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; "spark.executor.resourceSpec":&nbsp; "medium" <br> &nbsp; &nbsp; &nbsp; &nbsp; } <br> }|

#### SQL 类型应用

| **Parameters** | **Example Values / Operations** |
|---------------------------|---------------------------------------------|
| Aliyun ADB Cluster ID | amv-example |
| Aliyun ADB Resource Group | spark |
| Aliyun ADB App Type | Batch |
| Aliyun ADB Spark Data | show databases; <br> select * from example; |
Binary file added docs/img/tasks/demo/aliyun_adb_spark01.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added docs/img/tasks/demo/aliyun_adb_spark02.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added docs/img/tasks/demo/aliyun_adb_spark03.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added docs/img/tasks/demo/aliyun_adb_spark04.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.

0 comments on commit b713221

Please sign in to comment.