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

lidongdai 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 91f9cab  add task plugin docs (#441)
91f9cab is described below

commit 91f9cab1d26406bdc2a40abd23de5bee18ab11c7
Author: Kirs <[email protected]>
AuthorDate: Sat Oct 2 22:03:46 2021 +0800

    add task plugin docs (#441)
---
 docs/zh-cn/dev/user_doc/registry_spi.md |  2 +-
 docs/zh-cn/dev/user_doc/task_spi.md     | 35 +++++++++++++++++++++++++++++++++
 site_config/docsdev.js                  |  4 ++++
 3 files changed, 40 insertions(+), 1 deletion(-)

diff --git a/docs/zh-cn/dev/user_doc/registry_spi.md 
b/docs/zh-cn/dev/user_doc/registry_spi.md
index 8eec28c..380df01 100644
--- a/docs/zh-cn/dev/user_doc/registry_spi.md
+++ b/docs/zh-cn/dev/user_doc/registry_spi.md
@@ -2,7 +2,7 @@
 
 #### 如何使用?
 
-首先你需要执行 `mvn -U install package -Prelease -Dmaven.test.skip=true` 
安装插件,生成注册中心的插件 
jar。目录是:dolphinscheduler-dist/target/dolphinscheduler-dist-1.3.6-SNAPSHOT/lib/plugin/registry
+首先你需要执行 `mvn -U install package -Dmaven.test.skip=true` 安装插件,生成注册中心的插件 
jar。目录是:dolphinscheduler-dist/target/dolphinscheduler-dist-1.3.6-SNAPSHOT/lib/plugin/registry
 
 其次进行以下配置(以 zookeeper 为例)
 
diff --git a/docs/zh-cn/dev/user_doc/task_spi.md 
b/docs/zh-cn/dev/user_doc/task_spi.md
new file mode 100644
index 0000000..4a93b80
--- /dev/null
+++ b/docs/zh-cn/dev/user_doc/task_spi.md
@@ -0,0 +1,35 @@
+## DolphinScheduler Registry SPI 主要设计
+
+#### 开发环境如何使用?
+
+首先你需要执行 `mvn -U install package -Dmaven.test.skip=true` 安装插件,生成注册中心的插件 
jar。目录是:dolphinscheduler-dist/target/dolphinscheduler-dist-1.3.6-SNAPSHOT/lib/plugin/task(版本号会跟随主版本号变更)
+
+执行此命令会生成所有模块默认提供的所有插件。
+
+其次在(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
+```
+本地开发调试也可采用以下方式进行配置,例如:
+```
+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
+```
+请根据实际情况进行配置,
+
+#### 如何进行任务插件开发?
+
+### 后端开发:
+
+org.apache.dolphinscheduler.spi.task.TaskChannel
+
+插件实现以上接口即可。主要包含创建任务(任务初始化,任务运行等方法)、任务取消,如果是yarn 
任务,则需要实现org.apache.dolphinscheduler.plugin.task.api.AbstractYarnTask。
+
+我们在dolphinscheduler-task-api 
模块提供了所有任务对外访问的API,而dolphinscheduler-spi模块则是spi通用代码库,定义了所有的插件模块,比如告警模块,注册中心模块等,你可以详细阅读查看。
+
+
+
+
+
diff --git a/site_config/docsdev.js b/site_config/docsdev.js
index cc17159..d56ea73 100644
--- a/site_config/docsdev.js
+++ b/site_config/docsdev.js
@@ -44,6 +44,10 @@ export default {
             link: '/zh-cn/docs/dev/user_doc/registry_spi.html',
           },
           {
+            title: 'Task-SPI',
+            link: '/zh-cn/docs/dev/user_doc/task_spi.html',
+          },
+          {
             title: 'Global-Params',
             link: '/zh-cn/docs/dev/user_doc/globalParams.html',
           },

Reply via email to