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/07/29 02:58:31 UTC
[dolphinscheduler-website] branch master updated: Modify doc of
global params (#412)
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 8a6cd6b Modify doc of global params (#412)
8a6cd6b is described below
commit 8a6cd6b9691c292688df91d70d82f655681162ae
Author: wangxj3 <85...@qq.com>
AuthorDate: Thu Jul 29 10:58:24 2021 +0800
Modify doc of global params (#412)
* add global Params doc
* modify doc
* add link
* modify doc add img
Co-authored-by: wangxj <wangxj31>
---
docs/zh-cn/dev/user_doc/globalParams.md | 26 +++++++++++++-------------
img/globalParam/image-20210723101242216.png | Bin 0 -> 44625 bytes
img/globalParam/image-20210723102522383.png | Bin 0 -> 42919 bytes
img/globalParam/image-20210723102938239.png | Bin 0 -> 36581 bytes
img/globalParam/image-20210723103316896.png | Bin 0 -> 37954 bytes
img/globalParam/image-20210723103937052.png | Bin 0 -> 52946 bytes
img/globalParam/image-20210723104411489.png | Bin 0 -> 21894 bytes
img/globalParam/image-20210723104957031.png | Bin 0 -> 36588 bytes
img/globalParam/image-20210723105026924.png | Bin 0 -> 37906 bytes
img/globalParam/image-20210723105131381.png | Bin 0 -> 34311 bytes
img/globalParam/image-20210723105255850.png | Bin 0 -> 38332 bytes
site_config/docsdev.js | 3 +--
12 files changed, 14 insertions(+), 15 deletions(-)
diff --git a/docs/zh-cn/dev/user_doc/globalParams.md b/docs/zh-cn/dev/user_doc/globalParams.md
index 989df7c..ceb17d2 100644
--- a/docs/zh-cn/dev/user_doc/globalParams.md
+++ b/docs/zh-cn/dev/user_doc/globalParams.md
@@ -20,21 +20,21 @@ Dolphinscheduler中所涉及的变量部分包含三种类型
1:先以shell节点解释第一种情况
-<img src="C:\Users\86186\AppData\Roaming\Typora\typora-user-images\image-20210723102938239.png" alt="image-20210723102938239" style="zoom:50%;" />
+<img src="/img/globalParam/image-20210723102938239.png" alt="image-20210723102938239" style="zoom:50%;" />
节点 【useParam】可以使用到节点【createParam】中设置的变量。而节点 【useParam】与节点【noUseParam】中并没有依赖关系,所以并不会获取到节点【noUseParam】的变量。上图中只是以shell节点作为例子,其他类型节点具有相同的使用规则。
-<img src="C:\Users\86186\AppData\Roaming\Typora\typora-user-images\image-20210723103316896.png" alt="image-20210723103316896" style="zoom:50%;" />
+<img src="/img/globalParam/image-20210723103316896.png" alt="image-20210723103316896" style="zoom:50%;" />
其中节点【createParam】在使用变量时直接使用即可。另外该节点设置了"key"和"key1"两个变量,这里用户用定义了一个与上游节点传递的变量名相同的变量key1,并且复制了值为"12",但是由于我们设置的优先级的关系,这里的值"12"会被抛弃,最终使用上游节点设置的变量值。
2:我们再以sql节点来解释另外一种情况
-<img src="C:\Users\86186\AppData\Roaming\Typora\typora-user-images\image-20210723103937052.png" alt="image-20210723103937052" style="zoom:50%;" />
+<img src="/img/globalParam/image-20210723103937052.png" alt="image-20210723103937052" style="zoom:50%;" />
节点【use_create】的定义如下:
-![image-20210723104411489](C:\Users\86186\AppData\Roaming\Typora\typora-user-images\image-20210723104411489.png)
+![image-20210723104411489](/img/globalParam/image-20210723104411489.png)
"status"是当前节点设置的节点的自有变量。但是用户在保存时也同样设置了"status"变量,并且赋值为-1。那在该SQL执行时,status的值为优先级更高的-1。抛弃了节点的自有变量的值。
@@ -58,23 +58,23 @@ prop为用户指定;方向选择为OUT,只有当方向为OUT时才会被定
上图中节点【createParam1】的定义如下:
-<img src="C:\Users\86186\AppData\Roaming\Typora\typora-user-images\image-20210723104957031.png" alt="image-20210723104957031" style="zoom:50%;" />
+<img src="/img/globalParam/image-20210723104957031.png" alt="image-20210723104957031" style="zoom:50%;" />
节点【createParam2】的定义如下:
-<img src="C:\Users\86186\AppData\Roaming\Typora\typora-user-images\image-20210723105026924.png" alt="image-20210723105026924" style="zoom:50%;" />
+<img src="/img/globalParam/image-20210723105026924.png" alt="image-20210723105026924" style="zoom:50%;" />
您可以在【工作流实例】页面,找到对应的节点实例,便可以查看该变量的值。
节点实例【createParam1】如下:
-<img src="C:\Users\86186\AppData\Roaming\Typora\typora-user-images\image-20210723105131381.png" alt="image-20210723105131381" style="zoom:50%;" />
+<img src="/img/globalParam/image-20210723105131381.png" alt="image-20210723105131381" style="zoom:50%;" />
这里当然"id"的值会等于12.
我们再来看节点实例【createParam2】的情况。
-<img src="C:\Users\86186\AppData\Roaming\Typora\typora-user-images\image-20210723105255850.png" alt="image-20210723105255850" style="zoom:50%;" />
+<img src="/img/globalParam/image-20210723105255850.png" alt="image-20210723105255850" style="zoom:50%;" />
这里只有"id"的值。尽管用户定义的sql查到的是"id"和"database_name"两个字段,但是由于只定义了一个为out的变量"id",所以只会设置一个变量。由于显示的原因,这里已经替您查好了该list的长度为10。
@@ -82,15 +82,15 @@ prop为用户指定;方向选择为OUT,只有当方向为OUT时才会被定
prop为用户指定;方向选择为OUT,只有当方向为OUT时才会被定义为变量输出;数据类型可以根据需要选择不同数据结构;value部分不需要填写。
-用户需要传递参数,在定义shell脚本时,需要输出格式为$setVaule(key=value)的语句,key为对应参数的prop,value为该参数的值。
+用户需要传递参数,在定义shell脚本时,需要输出格式为$setValue(key=value)的语句,key为对应参数的prop,value为该参数的值。
例如下图中:
-<img src="C:\Users\86186\AppData\Roaming\Typora\typora-user-images\image-20210723101242216.png" alt="image-20210723101242216" style="zoom:50%;" />
+<img src="/img/globalParam/image-20210723101242216.png" alt="image-20210723101242216" style="zoom:50%;" />
shell节点定义时当日志检测到${setValue(key=value1)}的格式时,会将value1赋值给key,下游节点便可以直接使用变量 key的值。同样,您可以在【工作流实例】页面,找到对应的节点实例,便可以查看该变量的值。
-<img src="C:\Users\86186\AppData\Roaming\Typora\typora-user-images\image-20210723102522383.png" alt="image-20210723102522383" style="zoom:50%;" />
+<img src="/img/globalParam/image-20210723102522383.png" alt="image-20210723102522383" style="zoom:50%;" />
@@ -144,9 +144,9 @@ Worker收到后将varPool解析为Map<String,Property> 的格式,其中map的k
processor执行后的结果返回为Map<String,String>
-用户在定义shell脚本时需要在输出中定义$setVaule(key=value)
+用户在定义shell脚本时需要在输出中定义$setValue(key=value)
-在参数处理时去掉$setVaule(),按照“=”进行拆分,第0个为key,第1个为value。
+在参数处理时去掉$setValue(),按照“=”进行拆分,第0个为key,第1个为value。
同样匹配用户定义task时定义的OUT参数名与key,将value作为该参数的值。
diff --git a/img/globalParam/image-20210723101242216.png b/img/globalParam/image-20210723101242216.png
new file mode 100644
index 0000000..649b333
Binary files /dev/null and b/img/globalParam/image-20210723101242216.png differ
diff --git a/img/globalParam/image-20210723102522383.png b/img/globalParam/image-20210723102522383.png
new file mode 100644
index 0000000..ca04547
Binary files /dev/null and b/img/globalParam/image-20210723102522383.png differ
diff --git a/img/globalParam/image-20210723102938239.png b/img/globalParam/image-20210723102938239.png
new file mode 100644
index 0000000..47653c0
Binary files /dev/null and b/img/globalParam/image-20210723102938239.png differ
diff --git a/img/globalParam/image-20210723103316896.png b/img/globalParam/image-20210723103316896.png
new file mode 100644
index 0000000..d5e471e
Binary files /dev/null and b/img/globalParam/image-20210723103316896.png differ
diff --git a/img/globalParam/image-20210723103937052.png b/img/globalParam/image-20210723103937052.png
new file mode 100644
index 0000000..9a1ad82
Binary files /dev/null and b/img/globalParam/image-20210723103937052.png differ
diff --git a/img/globalParam/image-20210723104411489.png b/img/globalParam/image-20210723104411489.png
new file mode 100644
index 0000000..02e3025
Binary files /dev/null and b/img/globalParam/image-20210723104411489.png differ
diff --git a/img/globalParam/image-20210723104957031.png b/img/globalParam/image-20210723104957031.png
new file mode 100644
index 0000000..13db035
Binary files /dev/null and b/img/globalParam/image-20210723104957031.png differ
diff --git a/img/globalParam/image-20210723105026924.png b/img/globalParam/image-20210723105026924.png
new file mode 100644
index 0000000..3191d78
Binary files /dev/null and b/img/globalParam/image-20210723105026924.png differ
diff --git a/img/globalParam/image-20210723105131381.png b/img/globalParam/image-20210723105131381.png
new file mode 100644
index 0000000..3a82629
Binary files /dev/null and b/img/globalParam/image-20210723105131381.png differ
diff --git a/img/globalParam/image-20210723105255850.png b/img/globalParam/image-20210723105255850.png
new file mode 100644
index 0000000..6e3c34d
Binary files /dev/null and b/img/globalParam/image-20210723105255850.png differ
diff --git a/site_config/docsdev.js b/site_config/docsdev.js
index 452d21b..414d875 100644
--- a/site_config/docsdev.js
+++ b/site_config/docsdev.js
@@ -38,8 +38,7 @@ export default {
{
title: 'Dev-Run',
link: '/zh-cn/docs/dev/user_doc/dev_run.html',
- },
- ],
+ }, ],
},
],
barText: '文档',