You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@dolphinscheduler.apache.org by ki...@apache.org on 2021/10/25 02:51:34 UTC

[dolphinscheduler-website] branch master updated: [Translation] Translating Task_SPI.md (#456)

This is an automated email from the ASF dual-hosted git repository.

kirs pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/dolphinscheduler-website.git


The following commit(s) were added to refs/heads/master by this push:
     new efd580d  [Translation] Translating Task_SPI.md (#456)
efd580d is described below

commit efd580d7dadacd217ba69fbc4b488bad740447db
Author: QuakeWang <45...@users.noreply.github.com>
AuthorDate: Mon Oct 25 10:51:30 2021 +0800

    [Translation] Translating Task_SPI.md (#456)
    
    * docs: add en-us load-balance.md
    # Conflicts:
    #	docs/en-us/1.3.5/user_doc/load-balance.md
    
    * update task_spi.md
    
    * Delete load-balance.md
    
    * update task_spi.md
    
    * fix git conflict
---
 development/en-us/backend/spi/task.md | 34 ++++++++++++++++++++++++++++++++++
 development/zh-cn/backend/spi/task.md | 13 ++++---------
 2 files changed, 38 insertions(+), 9 deletions(-)

diff --git a/development/en-us/backend/spi/task.md b/development/en-us/backend/spi/task.md
new file mode 100644
index 0000000..e0e557f
--- /dev/null
+++ b/development/en-us/backend/spi/task.md
@@ -0,0 +1,34 @@
+## DolphinScheduler Task SPI main design
+
+#### How to use development environment?
+
+First you need to execute the `mvn -U install package -Dmaven.test.skip=true` to install the plugin for generating the plugin JAR of the registry. The directory is: dolphinscheduler-dist/target/dolphinscheduler-dist-1.3.6-SNAPSHOT/lib/plugin/task (The version number will follow the change of the main version number)
+
+Executing this command will generate all plugins provided by default for all modules.
+
+Next, configure the plugin directory in (dolphinscheduler-server/src/main/resources/worker.properties)
+
+```
+task.plugin.dir config the #task.plugin.dir config the Task Plugin dir . WorkerServer while find and load the Task Plugin Jar from this dir when deploy and start WorkerServer on the server .
+task.plugin.dir=dolphinscheduler-dist/target/dolphinscheduler-dist-1.3.6-SNAPSHOT/lib/plugin/task
+```
+
+The following configurations can be used for local development debugging, for example:
+
+```
+maven.local.repository=/Users/localRepository
+#task.plugin.binding config the task plugin need be load when development and run in IDE
+task.plugin.binding=./dolphinscheduler-task-plugin/dolphinscheduler-task-shell/pom.xml
+```
+
+Please configure according to the actual situation.
+
+#### How to do task plugin development?
+
+### Back-end development:
+
+org.apache.dolphinscheduler.spi.task.TaskChannel
+
+The plugin should implements the above interface.  It mainly contains methods for creating tasks (task initialization, task run, etc.), task cancellation, and if it is a yarn task, it needs to implement org.apache.dolphinscheduler.plugin.task.api.AbstractYarnTask.
+
+We provide the API for all tasks to be accessed externally in the dolphinscheduler-task-api module. And dolphinscheduler-spi module is the spi common code base that defines all the plug-in modules like alert module, registry module etc. You can read it in detail to see it.
diff --git a/development/zh-cn/backend/spi/task.md b/development/zh-cn/backend/spi/task.md
index 4a93b80..796baff 100644
--- a/development/zh-cn/backend/spi/task.md
+++ b/development/zh-cn/backend/spi/task.md
@@ -1,4 +1,4 @@
-## DolphinScheduler Registry SPI 主要设计
+## DolphinScheduler Task SPI 主要设计
 
 #### 开发环境如何使用?
 
@@ -17,7 +17,7 @@ maven.local.repository=/Users/localRepository
 #task.plugin.binding config the task plugin need be load when development and run in IDE
 task.plugin.binding=./dolphinscheduler-task-plugin/dolphinscheduler-task-shell/pom.xml
 ```
-请根据实际情况进行配置,
+请根据实际情况进行配置。
 
 #### 如何进行任务插件开发?
 
@@ -25,11 +25,6 @@ task.plugin.binding=./dolphinscheduler-task-plugin/dolphinscheduler-task-shell/p
 
 org.apache.dolphinscheduler.spi.task.TaskChannel
 
-插件实现以上接口即可。主要包含创建任务(任务初始化,任务运行等方法)、任务取消,如果是yarn 任务,则需要实现org.apache.dolphinscheduler.plugin.task.api.AbstractYarnTask。
-
-我们在dolphinscheduler-task-api 模块提供了所有任务对外访问的API,而dolphinscheduler-spi模块则是spi通用代码库,定义了所有的插件模块,比如告警模块,注册中心模块等,你可以详细阅读查看。
-
-
-
-
+插件实现以上接口即可。主要包含创建任务(任务初始化,任务运行等方法)、任务取消,如果是 yarn 任务,则需要实现 org.apache.dolphinscheduler.plugin.task.api.AbstractYarnTask。
 
+我们在 dolphinscheduler-task-api 模块提供了所有任务对外访问的 API,而 dolphinscheduler-spi 模块则是 spi 通用代码库,定义了所有的插件模块,比如告警模块,注册中心模块等,你可以详细阅读查看。